diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2011-10-14 07:43:25 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2011-10-14 07:43:25 +0000 |
| commit | 1be3357569b70a7bd11ad8d7a25b271a998e3296 (patch) | |
| tree | 4f8f755a613bb4e4097ca4255582eb8d6cc7f710 /src/plugins/General/converter | |
| parent | c6cf7ca90954e980d9fa4e10ba4a269e4b2518b9 (diff) | |
| download | qmmp-1be3357569b70a7bd11ad8d7a25b271a998e3296.tar.gz qmmp-1be3357569b70a7bd11ad8d7a25b271a998e3296.tar.bz2 qmmp-1be3357569b70a7bd11ad8d7a25b271a998e3296.zip | |
converter: fixed wave header
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@2394 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/converter')
14 files changed, 30 insertions, 29 deletions
diff --git a/src/plugins/General/converter/converter.cpp b/src/plugins/General/converter/converter.cpp index ea3ef3131..c7bb6c02e 100644 --- a/src/plugins/General/converter/converter.cpp +++ b/src/plugins/General/converter/converter.cpp @@ -207,11 +207,12 @@ void Converter::run() 0x64, 0x61, 0x74, 0x61, //"data" 0x00, 0x00, 0x00, 0x00 }; //chunk size*/ + quint16 sample_size = preset["use_16bit"].toBool() ? 2 : ap.sampleSize(); quint32 sample_rate = qToLittleEndian(ap.sampleRate()); quint16 channels = qToLittleEndian((quint16)ap.channels()); - quint16 block_align = qToLittleEndian((quint16)ap.sampleSize() * ap.channels()); - quint16 bps = qToLittleEndian((quint16)ap.sampleSize() * 8); - quint32 size = decoder->totalTime() * ap.sampleRate() * ap.channels() * ap.sampleSize() / 1000; + quint16 block_align = qToLittleEndian((quint16)sample_size * ap.channels()); + quint16 bps = qToLittleEndian((quint16)sample_size * 8); + quint32 size = decoder->totalTime() * ap.sampleRate() * ap.channels() * sample_size / 1000; size = qToLittleEndian(size); memcpy(&wave_header[22], &channels, 2); diff --git a/src/plugins/General/converter/translations/converter_plugin_cs.ts b/src/plugins/General/converter/translations/converter_plugin_cs.ts index ef6760ed1..0ca61709b 100644 --- a/src/plugins/General/converter/translations/converter_plugin_cs.ts +++ b/src/plugins/General/converter/translations/converter_plugin_cs.ts @@ -4,12 +4,12 @@ <context> <name>Converter</name> <message> - <location filename="../converter.cpp" line="145"/> + <location filename="../converter.cpp" line="167"/> <source>Track: %1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../converter.cpp" line="147"/> + <location filename="../converter.cpp" line="169"/> <source>Preset: %1</source> <translation type="unfinished"></translation> </message> diff --git a/src/plugins/General/converter/translations/converter_plugin_de.ts b/src/plugins/General/converter/translations/converter_plugin_de.ts index 709db95b3..83b387368 100644 --- a/src/plugins/General/converter/translations/converter_plugin_de.ts +++ b/src/plugins/General/converter/translations/converter_plugin_de.ts @@ -4,12 +4,12 @@ <context> <name>Converter</name> <message> - <location filename="../converter.cpp" line="145"/> + <location filename="../converter.cpp" line="167"/> <source>Track: %1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../converter.cpp" line="147"/> + <location filename="../converter.cpp" line="169"/> <source>Preset: %1</source> <translation type="unfinished"></translation> </message> diff --git a/src/plugins/General/converter/translations/converter_plugin_es.ts b/src/plugins/General/converter/translations/converter_plugin_es.ts index 915817552..752ca73a4 100644 --- a/src/plugins/General/converter/translations/converter_plugin_es.ts +++ b/src/plugins/General/converter/translations/converter_plugin_es.ts @@ -4,12 +4,12 @@ <context> <name>Converter</name> <message> - <location filename="../converter.cpp" line="145"/> + <location filename="../converter.cpp" line="167"/> <source>Track: %1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../converter.cpp" line="147"/> + <location filename="../converter.cpp" line="169"/> <source>Preset: %1</source> <translation type="unfinished"></translation> </message> diff --git a/src/plugins/General/converter/translations/converter_plugin_it.ts b/src/plugins/General/converter/translations/converter_plugin_it.ts index 535ed1470..f96ff020a 100644 --- a/src/plugins/General/converter/translations/converter_plugin_it.ts +++ b/src/plugins/General/converter/translations/converter_plugin_it.ts @@ -4,12 +4,12 @@ <context> <name>Converter</name> <message> - <location filename="../converter.cpp" line="145"/> + <location filename="../converter.cpp" line="167"/> <source>Track: %1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../converter.cpp" line="147"/> + <location filename="../converter.cpp" line="169"/> <source>Preset: %1</source> <translation type="unfinished"></translation> </message> diff --git a/src/plugins/General/converter/translations/converter_plugin_ja.ts b/src/plugins/General/converter/translations/converter_plugin_ja.ts index fe05d7155..b1e7b6aa9 100644 --- a/src/plugins/General/converter/translations/converter_plugin_ja.ts +++ b/src/plugins/General/converter/translations/converter_plugin_ja.ts @@ -4,12 +4,12 @@ <context> <name>Converter</name> <message> - <location filename="../converter.cpp" line="145"/> + <location filename="../converter.cpp" line="167"/> <source>Track: %1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../converter.cpp" line="147"/> + <location filename="../converter.cpp" line="169"/> <source>Preset: %1</source> <translation type="unfinished"></translation> </message> diff --git a/src/plugins/General/converter/translations/converter_plugin_lt.ts b/src/plugins/General/converter/translations/converter_plugin_lt.ts index 3abbc7107..b8d787506 100644 --- a/src/plugins/General/converter/translations/converter_plugin_lt.ts +++ b/src/plugins/General/converter/translations/converter_plugin_lt.ts @@ -4,12 +4,12 @@ <context> <name>Converter</name> <message> - <location filename="../converter.cpp" line="145"/> + <location filename="../converter.cpp" line="167"/> <source>Track: %1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../converter.cpp" line="147"/> + <location filename="../converter.cpp" line="169"/> <source>Preset: %1</source> <translation type="unfinished"></translation> </message> diff --git a/src/plugins/General/converter/translations/converter_plugin_nl.ts b/src/plugins/General/converter/translations/converter_plugin_nl.ts index d30f137f4..09dd2d226 100644 --- a/src/plugins/General/converter/translations/converter_plugin_nl.ts +++ b/src/plugins/General/converter/translations/converter_plugin_nl.ts @@ -4,12 +4,12 @@ <context> <name>Converter</name> <message> - <location filename="../converter.cpp" line="145"/> + <location filename="../converter.cpp" line="167"/> <source>Track: %1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../converter.cpp" line="147"/> + <location filename="../converter.cpp" line="169"/> <source>Preset: %1</source> <translation type="unfinished"></translation> </message> diff --git a/src/plugins/General/converter/translations/converter_plugin_pl.ts b/src/plugins/General/converter/translations/converter_plugin_pl.ts index d73496ec2..d69812aa6 100644 --- a/src/plugins/General/converter/translations/converter_plugin_pl.ts +++ b/src/plugins/General/converter/translations/converter_plugin_pl.ts @@ -4,12 +4,12 @@ <context> <name>Converter</name> <message> - <location filename="../converter.cpp" line="145"/> + <location filename="../converter.cpp" line="167"/> <source>Track: %1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../converter.cpp" line="147"/> + <location filename="../converter.cpp" line="169"/> <source>Preset: %1</source> <translation type="unfinished"></translation> </message> diff --git a/src/plugins/General/converter/translations/converter_plugin_ru.ts b/src/plugins/General/converter/translations/converter_plugin_ru.ts index 71f8045e5..d1675cdb1 100644 --- a/src/plugins/General/converter/translations/converter_plugin_ru.ts +++ b/src/plugins/General/converter/translations/converter_plugin_ru.ts @@ -4,12 +4,12 @@ <context> <name>Converter</name> <message> - <location filename="../converter.cpp" line="145"/> + <location filename="../converter.cpp" line="167"/> <source>Track: %1</source> <translation>Трек: %1</translation> </message> <message> - <location filename="../converter.cpp" line="147"/> + <location filename="../converter.cpp" line="169"/> <source>Preset: %1</source> <translation>Предустановка: %1</translation> </message> diff --git a/src/plugins/General/converter/translations/converter_plugin_tr.ts b/src/plugins/General/converter/translations/converter_plugin_tr.ts index 2d591b6b6..93c4d590a 100644 --- a/src/plugins/General/converter/translations/converter_plugin_tr.ts +++ b/src/plugins/General/converter/translations/converter_plugin_tr.ts @@ -4,12 +4,12 @@ <context> <name>Converter</name> <message> - <location filename="../converter.cpp" line="145"/> + <location filename="../converter.cpp" line="167"/> <source>Track: %1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../converter.cpp" line="147"/> + <location filename="../converter.cpp" line="169"/> <source>Preset: %1</source> <translation type="unfinished"></translation> </message> diff --git a/src/plugins/General/converter/translations/converter_plugin_uk_UA.ts b/src/plugins/General/converter/translations/converter_plugin_uk_UA.ts index 06d30351d..1b4d9e01f 100644 --- a/src/plugins/General/converter/translations/converter_plugin_uk_UA.ts +++ b/src/plugins/General/converter/translations/converter_plugin_uk_UA.ts @@ -4,12 +4,12 @@ <context> <name>Converter</name> <message> - <location filename="../converter.cpp" line="145"/> + <location filename="../converter.cpp" line="167"/> <source>Track: %1</source> <translation>Доріжка: %1</translation> </message> <message> - <location filename="../converter.cpp" line="147"/> + <location filename="../converter.cpp" line="169"/> <source>Preset: %1</source> <translation>Предвстановлення: %1</translation> </message> diff --git a/src/plugins/General/converter/translations/converter_plugin_zh_CN.ts b/src/plugins/General/converter/translations/converter_plugin_zh_CN.ts index a8e25e4ee..ecff1edd9 100644 --- a/src/plugins/General/converter/translations/converter_plugin_zh_CN.ts +++ b/src/plugins/General/converter/translations/converter_plugin_zh_CN.ts @@ -4,12 +4,12 @@ <context> <name>Converter</name> <message> - <location filename="../converter.cpp" line="145"/> + <location filename="../converter.cpp" line="167"/> <source>Track: %1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../converter.cpp" line="147"/> + <location filename="../converter.cpp" line="169"/> <source>Preset: %1</source> <translation type="unfinished"></translation> </message> diff --git a/src/plugins/General/converter/translations/converter_plugin_zh_TW.ts b/src/plugins/General/converter/translations/converter_plugin_zh_TW.ts index 2308fb96b..7a661e3d8 100644 --- a/src/plugins/General/converter/translations/converter_plugin_zh_TW.ts +++ b/src/plugins/General/converter/translations/converter_plugin_zh_TW.ts @@ -4,12 +4,12 @@ <context> <name>Converter</name> <message> - <location filename="../converter.cpp" line="145"/> + <location filename="../converter.cpp" line="167"/> <source>Track: %1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../converter.cpp" line="147"/> + <location filename="../converter.cpp" line="169"/> <source>Preset: %1</source> <translation type="unfinished"></translation> </message> |
