X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fxinestream.cpp;h=7317f7c8838449e8e901676ea4b8ebce4799760a;hb=f6ea07afd139ecfe76f9a72e4c736d94a1e67820;hp=1d7433e5e5807eacfe5ae799f3d12fb84c02ec32;hpb=f12432159e6064c5219a4bf264b9b7e752e6471b;p=xinema.git diff --git a/source/xinestream.cpp b/source/xinestream.cpp index 1d7433e..7317f7c 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)) @@ -172,16 +172,20 @@ void XineStream::update_channels() audio_channels.resize(n_audio); for(unsigned i=0; i