mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 09:59:54 +00:00
src/wav.c : When writing loop lengths, adjust the end position by one to make up for Microsoft's screwed up spec.
This commit is contained in:
parent
f909407d40
commit
10bd968638
@ -1,3 +1,9 @@
|
||||
2009-10-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/wav.c
|
||||
When writing loop lengths, adjust the end position by one to make up for
|
||||
Microsoft's screwed up spec. Thanks to Olivier Tristan for the patch.
|
||||
|
||||
2009-10-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/flac.c
|
||||
|
@ -1097,7 +1097,7 @@ wav_write_header (SF_PRIVATE *psf, int calc_length)
|
||||
type = (type == SF_LOOP_FORWARD ? 0 : type==SF_LOOP_BACKWARD ? 2 : type == SF_LOOP_ALTERNATING ? 1 : 32) ;
|
||||
|
||||
psf_binheader_writef (psf, "44", tmp, type) ;
|
||||
psf_binheader_writef (psf, "44", psf->instrument->loops [tmp].start, psf->instrument->loops [tmp].end) ;
|
||||
psf_binheader_writef (psf, "44", psf->instrument->loops [tmp].start, psf->instrument->loops [tmp].end - 1) ;
|
||||
psf_binheader_writef (psf, "44", 0, psf->instrument->loops [tmp].count) ;
|
||||
} ;
|
||||
} ;
|
||||
@ -1503,7 +1503,7 @@ wav_read_smpl_chunk (SF_PRIVATE *psf, unsigned int chunklen)
|
||||
|
||||
if (j < ARRAY_LEN (psf->instrument->loops))
|
||||
{ psf->instrument->loops [j].start = start ;
|
||||
psf->instrument->loops [j].end = end ;
|
||||
psf->instrument->loops [j].end = end + 1 ;
|
||||
psf->instrument->loops [j].count = count ;
|
||||
|
||||
switch (type)
|
||||
|
Loading…
Reference in New Issue
Block a user