From: <ba...@us...> - 2006-09-17 23:33:45
|
Revision: 357 http://svn.sourceforge.net/cadcdev/?rev=357&view=rev Author: bardtx Date: 2006-09-17 16:33:39 -0700 (Sun, 17 Sep 2006) Log Message: ----------- kos: Patch #1182280 from SourceForge: This patch adds a new method "mp3_volume" as well as exposes "sndmp3_volume" Modified Paths: -------------- kos-ports/include/mp3/sndmp3.h kos-ports/include/mp3/sndserver.h kos-ports/libmp3/libmp3/main.c Modified: kos-ports/include/mp3/sndmp3.h =================================================================== --- kos-ports/include/mp3/sndmp3.h 2006-09-17 23:29:30 UTC (rev 356) +++ kos-ports/include/mp3/sndmp3.h 2006-09-17 23:33:39 UTC (rev 357) @@ -22,6 +22,9 @@ /* Shut everything down */ void sndmp3_shutdown(); +/* Controls volume of MP3 stream */ +void sndmp3_volume(int vol); + __END_DECLS #endif /* __SNDMP3_H */ Modified: kos-ports/include/mp3/sndserver.h =================================================================== --- kos-ports/include/mp3/sndserver.h 2006-09-17 23:29:30 UTC (rev 356) +++ kos-ports/include/mp3/sndserver.h 2006-09-17 23:33:39 UTC (rev 357) @@ -28,6 +28,9 @@ /* Shuts down the MP3 server thread */ int mp3_quit(); +/* Controls volume level of stream */ +void mp3_volume(int vol); + __END_DECLS #endif /* __SNDSERVER_H */ Modified: kos-ports/libmp3/libmp3/main.c =================================================================== --- kos-ports/libmp3/libmp3/main.c 2006-09-17 23:29:30 UTC (rev 356) +++ kos-ports/libmp3/libmp3/main.c 2006-09-17 23:33:39 UTC (rev 357) @@ -20,6 +20,8 @@ } int mp3_init() { + if (snd_stream_init() < 0) + return -1; if (thd_create(sndserver_thread, NULL) != NULL) { sndmp3_wait_start(); return 0; @@ -41,4 +43,6 @@ return 0; } - +void mp3_volume(int vol) { + sndmp3_volume(vol); +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |