diff options
author | acm <acm@FreeBSD.org> | 2006-08-22 04:18:05 +0800 |
---|---|---|
committer | acm <acm@FreeBSD.org> | 2006-08-22 04:18:05 +0800 |
commit | 19895050844fb893ffd7ff7397a1ea0247d78c52 (patch) | |
tree | 695cc42fae6aed5d241b98a2d312470ca3210853 /games/el | |
parent | bcd288c030f0e0e865e83aa111aa46cd65d6c836 (diff) | |
download | freebsd-ports-gnome-19895050844fb893ffd7ff7397a1ea0247d78c52.tar.gz freebsd-ports-gnome-19895050844fb893ffd7ff7397a1ea0247d78c52.tar.zst freebsd-ports-gnome-19895050844fb893ffd7ff7397a1ea0247d78c52.zip |
- Add some missing things to patch-openal.c
- Fixes problems with empty directories on games/el-data
Approved by: garga (mentor)
Diffstat (limited to 'games/el')
-rw-r--r-- | games/el/Makefile | 1 | ||||
-rw-r--r-- | games/el/files/patch-sound.c | 32 |
2 files changed, 30 insertions, 3 deletions
diff --git a/games/el/Makefile b/games/el/Makefile index cc78bfae496e..499847b68ec1 100644 --- a/games/el/Makefile +++ b/games/el/Makefile @@ -7,6 +7,7 @@ PORTNAME= el PORTVERSION= 130 +PORTREVISION= 1 CATEGORIES= games MASTER_SITES= ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= acm/${PORTNAME} diff --git a/games/el/files/patch-sound.c b/games/el/files/patch-sound.c index 773f40cf4824..8cc374a1967a 100644 --- a/games/el/files/patch-sound.c +++ b/games/el/files/patch-sound.c @@ -1,5 +1,5 @@ ---- sound.c Fri Aug 18 12:54:36 2006 -+++ sound.c Fri Aug 18 11:33:35 2006 +--- sound.c Mon Aug 21 11:20:53 2006 ++++ sound.c Mon Aug 21 11:25:49 2006 @@ -313,10 +313,11 @@ ALuint get_loaded_buffer(int i) { @@ -24,7 +24,33 @@ - alBufferData(sound_buffer[i],format,data,size,freq); - alutUnloadWAV(format,data,size,freq); + alBufferData(sound_buffer[i],format,data,size,(int)freq); -+// alutUnloadWAV(format,data,size,freq); ++ free(data); } return sound_buffer[i]; } +@@ -377,14 +378,14 @@ + #ifndef OSX + alutLoadWAVFile(szPath,&pSample->format,&data,&pSample->size,&pSample->freq,&loop); + #else +- alutLoadWAVFile(szPath,&pSample->format,&data,&pSample->size,&pSample->freq); ++ data = alutLoadMemoryFromFile(szPath, &pSample->format, &pSample->size, &pSample->freq); + #endif + if(!data) + {//couldn't load the file + #ifdef ELC + LOG_ERROR("%s: %s",snd_buff_error, "NO SOUND DATA"); + #else +- printf("ensure_sample_loaded : alutLoadWAVFile(%s) = %s\n", ++ printf("ensure_sample_loaded : alutLoadMemoryFromFile(%s) = %s\n", + szPath, "NO SOUND DATA"); + #endif + return 1; +@@ -420,7 +421,7 @@ + pSample->length = (pSample->size*1000) / ((pSample->bits >> 3)*pSample->channels*pSample->freq); + + //get rid of the temporary data +- alutUnloadWAV(pSample->format,data,pSample->size,pSample->freq); ++ free(data); + } + + pSample->loaded_status = 1; |