Enlightenment CVS committal
Author : tsauerbeck
Project : misc
Module : eplayer
Dir : misc/eplayer/src/output/oss
Modified Files:
oss.c
Log Message:
Plugin fixes
===================================================================
RCS file: /cvsroot/enlightenment/misc/eplayer/src/output/oss/oss.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- oss.c 30 Nov 2003 12:32:46 -0000 1.7
+++ oss.c 30 Nov 2003 15:37:40 -0000 1.8
@@ -14,6 +14,7 @@
# include <machine/soundcard.h>
#endif
+static OutputPlugin *op = NULL;
static int fd = -1;
static pthread_cond_t cond;
@@ -23,6 +24,8 @@
close(fd);
fd = -1;
}
+
+ op = NULL;
}
int oss_configure(int channels, int rate, int bits) {
@@ -45,26 +48,27 @@
format = bigendian ? AFMT_S16_BE : AFMT_S16_LE;
if (ioctl(fd, SNDCTL_DSP_SETFMT, &format) == -1) {
- debug(DEBUG_LEVEL_CRITICAL, "OSS: Cannot set format!\n");
+ op->debug(DEBUG_LEVEL_CRITICAL, "OSS: Cannot set format!\n");
return 0;
}
/* set mono/stereo mode */
tmp = channels - 1;
if (ioctl(fd, SNDCTL_DSP_STEREO, &tmp) == -1) {
- debug(DEBUG_LEVEL_CRITICAL, "OSS: Cannot set channels!\n");
+ op->debug(DEBUG_LEVEL_CRITICAL, "OSS: Cannot set channels!\n");
return 0;
}
/* set samplerate */
tmp = rate;
if (ioctl(fd, SNDCTL_DSP_SPEED, &tmp) == -1) {
- debug(DEBUG_LEVEL_CRITICAL, "OSS: Cannot set samplerate!\n");
+ op->debug(DEBUG_LEVEL_CRITICAL,
+ "OSS: Cannot set samplerate!\n");
return 0;
}
if (tmp != rate)
- debug(DEBUG_LEVEL_WARNING,
+ op->debug(DEBUG_LEVEL_WARNING,
"OSS: Requested samplerate = %i, using %i\n",
rate, tmp);
@@ -166,7 +170,9 @@
pthread_cond_destroy(&cond);
}
-int plugin_init(OutputPlugin *op) {
+int plugin_init(OutputPlugin *p) {
+ op = p;
+
op->configure = oss_configure;
op->play = oss_play;
op->volume_get = oss_volume_get;
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs