diff options
Diffstat (limited to 'media-video/mplayer/files/mplayer-1.0_pre5-bio2jack.patch')
-rw-r--r-- | media-video/mplayer/files/mplayer-1.0_pre5-bio2jack.patch | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/media-video/mplayer/files/mplayer-1.0_pre5-bio2jack.patch b/media-video/mplayer/files/mplayer-1.0_pre5-bio2jack.patch new file mode 100644 index 000000000000..78a5f0e4b652 --- /dev/null +++ b/media-video/mplayer/files/mplayer-1.0_pre5-bio2jack.patch @@ -0,0 +1,70 @@ +Index: main/libao2/ao_jack.c +=================================================================== +RCS file: /cvsroot/mplayer/main/libao2/ao_jack.c,v +retrieving revision 1.2 +diff -u -r1.2 ao_jack.c +--- main/libao2/ao_jack.c 27 Jun 2004 13:18:06 -0000 1.2 ++++ main/libao2/ao_jack.c 10 Aug 2004 17:48:48 -0000 +@@ -34,8 +34,8 @@ + long JACK_Write(int deviceID, char *data, unsigned long bytes); /* returns the number of bytes written */ + long JACK_GetJackLatency(int deviceID); /* return the latency in milliseconds of jack */ + int JACK_SetState(int deviceID, enum status_enum state); /* playing, paused, stopped */ +-int JACK_SetVolume(int deviceID, int left, int right); /* returns 0 on success */ +-void JACK_GetVolume(int deviceID, int *left, int *right); ++int JACK_SetVolumeForChannel(int deviceID, unsigned int channel, unsigned int volume); /* return 0 on success */ ++void JACK_GetVolumeForChannel(int deviceID, unsigned int channel, unsigned int *volume); + // + + +@@ -57,9 +57,10 @@ + case AOCONTROL_GET_VOLUME: + { + ao_control_vol_t *vol = (ao_control_vol_t *)arg; +- int l, r; ++ unsigned int l, r; + +- JACK_GetVolume(driver, &l, &r); ++ JACK_GetVolumeForChannel(driver, 0, &l); ++ JACK_GetVolumeForChannel(driver, 1, &r); + vol->left = (float )l; + vol->right = (float )r; + +@@ -68,16 +69,21 @@ + case AOCONTROL_SET_VOLUME: + { + ao_control_vol_t *vol = (ao_control_vol_t *)arg; +- int l = (int )vol->left, ++ unsigned int l = (int )vol->left, + r = (int )vol->right, + err = 0; + +- if((err = JACK_SetVolume(driver, l, r))) { ++ if((err = JACK_SetVolumeForChannel(driver, 0, l))) { + mp_msg(MSGT_AO, MSGL_ERR, +- "AO: [Jack] Setting volume failed, error %d\n",err); ++ "AO: [Jack] Setting left volume failed, error %d\n",err); + return CONTROL_ERROR; + } +- ++ if((err = JACK_SetVolumeForChannel(driver, 1, r))) { ++ mp_msg(MSGT_AO, MSGL_ERR, ++ "AO: [Jack] Setting right volume failed, error %d\n",err); ++ return CONTROL_ERROR; ++ } ++ + return CONTROL_OK; + } + } +--- main/configure.~1.893.~ 2004-08-09 15:51:44.000000000 +0300 ++++ main/configure 2004-08-10 20:41:00.000000000 +0300 +@@ -4187,7 +4187,9 @@ + #include <jack/jack.h> + int main(void) { JACK_Init(); return 0; } + EOF +- if test -z "$_bio2jackdir" ; then ++ if ( ( test ! `bio2jack-config --version|cut -d"." -f2` -ge "2" ) ) ; then ++ _jack=no; ++ elif test -z "$_bio2jackdir" ; then + cc_check -lbio2jack `pkg-config --libs --cflags jack` && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _jack=yes + else + cc_check -L "$_bio2jackdir" -lbio2jack `pkg-config --libs --cflags jack` && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _jack=yes |