X-Git-Url: http://git.tdb.fi/?p=xinema.git;a=blobdiff_plain;f=source%2Fxinestream.cpp;fp=source%2Fxinestream.cpp;h=8099f3b3eb453b0fd4f8ccf9b661b19166d420d9;hp=1d7433e5e5807eacfe5ae799f3d12fb84c02ec32;hb=57fa1e2b4cba16ab023aba0b5ec4a5ee9c1307f8;hpb=4ba14a468629f5cc83852758ca4b00407e581696 diff --git a/source/xinestream.cpp b/source/xinestream.cpp index 1d7433e..8099f3b 100644 --- a/source/xinestream.cpp +++ b/source/xinestream.cpp @@ -31,26 +31,6 @@ XineStream::~XineStream() xine_dispose(stream); } -void XineStream::select_audio_channel(int i) -{ - if(i>=0 && static_cast(i)>=audio_channels.size()) - throw out_of_range("XineStream::set_audio_channel"); - - if(i<0) - i = OFF; - xine_set_param(stream, XINE_PARAM_AUDIO_CHANNEL_LOGICAL, (i==OFF ? -2 : i)); -} - -void XineStream::select_spu_channel(int i) -{ - if(i>=0 && static_cast(i)>=spu_channels.size()) - throw out_of_range("XineStream::set_spu_channel"); - - if(i<0) - i = OFF; - xine_set_param(stream, XINE_PARAM_SPU_CHANNEL, (i==OFF ? -2 : i)); -} - void XineStream::play() { if(state==STOPPED) @@ -96,6 +76,26 @@ void XineStream::set_state(State s) signal_state_changed.emit(state); } +void XineStream::select_audio_channel(int i) +{ + if(i>=0 && static_cast(i)>=audio_channels.size()) + throw out_of_range("XineStream::set_audio_channel"); + + if(i<0) + i = OFF; + xine_set_param(stream, XINE_PARAM_AUDIO_CHANNEL_LOGICAL, (i==OFF ? -2 : i)); +} + +void XineStream::select_spu_channel(int i) +{ + if(i>=0 && static_cast(i)>=spu_channels.size()) + throw out_of_range("XineStream::set_spu_channel"); + + if(i<0) + i = OFF; + xine_set_param(stream, XINE_PARAM_SPU_CHANNEL, (i==OFF ? -2 : i)); +} + void XineStream::tick() { while(xine_event_t *event = xine_event_get(queue))