mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-24 00:18:13 +02:00
2016-08-02 Fred Gleason <fredg@paravelsystems.com>
* Added a work-around in 'lib/rdwavefile.cpp' to ensure that RDXL chunks are always of even length.
This commit is contained in:
parent
1c52c13a7b
commit
d232842b0c
@ -15449,3 +15449,6 @@
|
|||||||
2016-08-02 Fred Gleason <fredg@paravelsystems.com>
|
2016-08-02 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Fixed a bug in 'lib/rdwavefile.cpp' that caused WAV files to
|
* Fixed a bug in 'lib/rdwavefile.cpp' that caused WAV files to
|
||||||
be written with incorrect LEVL chunk data.
|
be written with incorrect LEVL chunk data.
|
||||||
|
2016-08-02 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Added a work-around in 'lib/rdwavefile.cpp' to ensure that RDXL
|
||||||
|
chunks are always of even length.
|
||||||
|
@ -661,7 +661,6 @@ void RDWaveFile::closeWave(int samples)
|
|||||||
size_buf[3]=(lsize>>24)&0xff;
|
size_buf[3]=(lsize>>24)&0xff;
|
||||||
write(wave_file.handle(),size_buf,4);
|
write(wave_file.handle(),size_buf,4);
|
||||||
write(wave_file.handle(),levl_chunk_data,LEVL_CHUNK_SIZE-8);
|
write(wave_file.handle(),levl_chunk_data,LEVL_CHUNK_SIZE-8);
|
||||||
//write(wave_file.handle(),levl_chunk_data,LEVL_CHUNK_SIZE-4);
|
|
||||||
// Fixup the endianness
|
// Fixup the endianness
|
||||||
unsigned char * sbuf = new unsigned char [2 * energy_data.size()];
|
unsigned char * sbuf = new unsigned char [2 * energy_data.size()];
|
||||||
for (unsigned int i=0; i < energy_data.size(); i++){
|
for (unsigned int i=0; i < energy_data.size(); i++){
|
||||||
@ -2152,6 +2151,14 @@ QString RDWaveFile::getRdxlContents() const
|
|||||||
void RDWaveFile::setRdxlContents(const QString &xml)
|
void RDWaveFile::setRdxlContents(const QString &xml)
|
||||||
{
|
{
|
||||||
rdxl_contents=xml;
|
rdxl_contents=xml;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Make sure that the RDXL chunk is of even length.
|
||||||
|
// (To avoid goosing a bug in CoolEdit Pro 2003).
|
||||||
|
//
|
||||||
|
if((rdxl_contents.length()%2)!=2) {
|
||||||
|
rdxl_contents+=" ";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user