Mercurial > audlegacy-plugins
changeset 993:febbc2c05d33 trunk
[svn]
- A simpler version of flac_write()
author | ertzing |
---|---|
date | Tue, 01 May 2007 08:30:24 -0700 |
parents | a277aaab4525 |
children | 91f9925d88f1 |
files | ChangeLog src/filewriter/flac.c |
diffstat | 2 files changed, 25 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue May 01 08:26:10 2007 -0700 +++ b/ChangeLog Tue May 01 08:30:24 2007 -0700 @@ -1,3 +1,11 @@ +2007-05-01 15:26:10 +0000 William Pitcock <nenolod@sacredspiral.co.uk> + revision [2124] + - remove the padding, flac starts working. + + trunk/src/filewriter/flac.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + + 2007-05-01 15:07:48 +0000 William Pitcock <nenolod@sacredspiral.co.uk> revision [2122] - commit what i have, presently broken
--- a/src/filewriter/flac.c Tue May 01 08:26:10 2007 -0700 +++ b/src/filewriter/flac.c Tue May 01 08:30:24 2007 -0700 @@ -91,6 +91,7 @@ static void flac_write(gpointer data, gint length) { +#if 0 FLAC__int32 *encbuffer[2]; short int *tmpdata = data; int i; @@ -120,6 +121,22 @@ g_free(encbuffer[0]); g_free(encbuffer[1]); +#endif + + FLAC__int32 *encbuffer; + gint16_t *tmpdata = data; + int i; + + encbuffer = g_new0(FLAC__int32, length); + + for (i=0; i < (length/2); i++) { + encbuffer[i] = tmpdata[i]; + } + + FLAC__stream_encoder_process_interleaved(flac_encoder, encbuffer, (length/2)); + olen += length; + + g_free(encbuffer); } static void flac_close(void)