Mercurial > audlegacy
changeset 1638:9937a2512823 trunk
[svn] - wma.c: use av_malloc() instead of directly using posix_memalign()
- libffwma/mem.c: use posix_memalign() only on glibc, other platforms do not need it
author | nenolod |
---|---|
date | Thu, 07 Sep 2006 11:45:48 -0700 |
parents | 5261e37b4d55 |
children | 3299a2225fa6 |
files | ChangeLog Plugins/Input/wma/libffwma/mem.c Plugins/Input/wma/wma.c |
diffstat | 3 files changed, 27 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Sep 07 11:32:59 2006 -0700 +++ b/ChangeLog Thu Sep 07 11:45:48 2006 -0700 @@ -1,3 +1,22 @@ +2006-09-07 18:32:59 +0000 William Pitcock <nenolod@nenolod.net> + revision [2205] + - fully working CoreAudio plugin, based on the OSS plugin and an incomplete xmms coreaudio plugin (fink) + + + Changes: Modified: + +17 -0 trunk/Plugins/Output/CoreAudio/Makefile + +48 -0 trunk/Plugins/Output/CoreAudio/about.c + +612 -0 trunk/Plugins/Output/CoreAudio/audio.c + +296 -0 trunk/Plugins/Output/CoreAudio/configure.c + +313 -0 trunk/Plugins/Output/CoreAudio/convert.c + +51 -0 trunk/Plugins/Output/CoreAudio/coreaudio.c + +106 -0 trunk/Plugins/Output/CoreAudio/coreaudio.h + +231 -0 trunk/Plugins/Output/CoreAudio/dbaudiolib.h + +524 -0 trunk/Plugins/Output/CoreAudio/dbconvert.c + +55 -0 trunk/Plugins/Output/CoreAudio/init.c + +81 -0 trunk/Plugins/Output/CoreAudio/mixer.c + + 2006-09-07 18:06:40 +0000 William Pitcock <nenolod@nenolod.net> revision [2203] - remove CoreAudio plugin, and try again :P
--- a/Plugins/Input/wma/libffwma/mem.c Thu Sep 07 11:32:59 2006 -0700 +++ b/Plugins/Input/wma/libffwma/mem.c Thu Sep 07 11:45:48 2006 -0700 @@ -45,7 +45,11 @@ { void *ptr; +#ifdef __GLIBC__ posix_memalign(&ptr, 16, size); +#else + ptr = malloc(size); +#endif return ptr; }
--- a/Plugins/Input/wma/wma.c Thu Sep 07 11:32:59 2006 -0700 +++ b/Plugins/Input/wma/wma.c Thu Sep 07 11:45:48 2006 -0700 @@ -433,8 +433,10 @@ wma_ip.set_info(wsong_title, wsong_time, c->bit_rate, c->sample_rate, c->channels); - posix_memalign((void *) &wma_s_outbuf, 16, wma_st_buff); - posix_memalign((void *) &wma_outbuf, 16, AVCODEC_MAX_AUDIO_FRAME_SIZE); + /* av_malloc() will wrap posix_memalign() if necessary -nenolod */ + wma_s_outbuf = av_malloc(wma_st_buff); + wma_outbuf = av_malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE); + wma_seekpos = -1; wma_decode = 1; wma_decode_thread = g_thread_create((GThreadFunc)wma_play_loop, NULL, TRUE, NULL);