mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 09:59:54 +00:00
aiff.c : Move to new (correct) AIFF string style.
This commit is contained in:
parent
8990675098
commit
8a716dbe75
25
ChangeLog
25
ChangeLog
@ -1,3 +1,24 @@
|
||||
2005-07-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/common.c
|
||||
Change the 'S' format specifier of psf_binheader_writef() to write AIFF
|
||||
style strings (no terminating character).
|
||||
|
||||
* src/aiff.c
|
||||
Move to new (correct) AIFF string style. Thanks to Axel Roebel for being
|
||||
so persistent on this issue.
|
||||
|
||||
2005-07-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/sndfile.c
|
||||
Allow SFE_UNSUPPORTED_FORMAT as an error from sf_open().
|
||||
|
||||
* doc/api.html doc/command.html
|
||||
Documentation updates (thanks to Kyroz for promoting these updates).
|
||||
|
||||
* src/mat5.c
|
||||
Modify the way the header is written.
|
||||
|
||||
2005-07-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/caf.c
|
||||
@ -35,8 +56,8 @@
|
||||
* src/common.c
|
||||
Fix printing of Frames.
|
||||
|
||||
* tests/Makefile.am tests/write_read_test.tpl tests/lossy_comp_test.c
|
||||
tests/header_test.tpl misc_test.c
|
||||
* tests/Makefile.am tests/write_read_test.tpl tests/lossy_comp_test.c
|
||||
tests/header_test.tpl misc_test.c
|
||||
Add tests for CAF files.
|
||||
|
||||
2005-07-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
14
src/aiff.c
14
src/aiff.c
@ -556,7 +556,7 @@ aiff_read_header (SF_PRIVATE *psf, COMM_CHUNK *comm_fmt)
|
||||
psf_binheader_readf (psf, "E4", &dword) ;
|
||||
if (dword == 0)
|
||||
break ;
|
||||
if (dword > SIGNED_SIZEOF (psf->u.scbuf) - 1)
|
||||
if (dword > SIGNED_SIZEOF (psf->u.scbuf) - 2)
|
||||
{ psf_log_printf (psf, " %M : %d (too big)\n", marker, dword) ;
|
||||
return SFE_INTERNAL ;
|
||||
} ;
|
||||
@ -572,7 +572,7 @@ aiff_read_header (SF_PRIVATE *psf, COMM_CHUNK *comm_fmt)
|
||||
psf_binheader_readf (psf, "E4", &dword) ;
|
||||
if (dword == 0)
|
||||
break ;
|
||||
if (dword > SIGNED_SIZEOF (psf->u.scbuf) - 1)
|
||||
if (dword > SIGNED_SIZEOF (psf->u.scbuf) - 2)
|
||||
{ psf_log_printf (psf, " %M : %d (too big)\n", marker, dword) ;
|
||||
return SFE_INTERNAL ;
|
||||
} ;
|
||||
@ -1134,23 +1134,23 @@ aiff_write_strings (SF_PRIVATE *psf, int location)
|
||||
|
||||
switch (psf->strings [k].type)
|
||||
{ case SF_STR_SOFTWARE :
|
||||
psf_binheader_writef (psf, "Ems", APPL_MARKER, psf->strings [k].str) ;
|
||||
psf_binheader_writef (psf, "EmS", APPL_MARKER, psf->strings [k].str) ;
|
||||
break ;
|
||||
|
||||
case SF_STR_TITLE :
|
||||
psf_binheader_writef (psf, "Ems", NAME_MARKER, psf->strings [k].str) ;
|
||||
psf_binheader_writef (psf, "EmS", NAME_MARKER, psf->strings [k].str) ;
|
||||
break ;
|
||||
|
||||
case SF_STR_COPYRIGHT :
|
||||
psf_binheader_writef (psf, "Ems", c_MARKER, psf->strings [k].str) ;
|
||||
psf_binheader_writef (psf, "EmS", c_MARKER, psf->strings [k].str) ;
|
||||
break ;
|
||||
|
||||
case SF_STR_ARTIST :
|
||||
psf_binheader_writef (psf, "Ems", AUTH_MARKER, psf->strings [k].str) ;
|
||||
psf_binheader_writef (psf, "EmS", AUTH_MARKER, psf->strings [k].str) ;
|
||||
break ;
|
||||
|
||||
case SF_STR_COMMENT :
|
||||
psf_binheader_writef (psf, "Ems", ANNO_MARKER, psf->strings [k].str) ;
|
||||
psf_binheader_writef (psf, "EmS", ANNO_MARKER, psf->strings [k].str) ;
|
||||
break ;
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user