diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2005-01-06 13:50:17 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2005-01-06 13:50:17 +0100 |
commit | b38753888777a22e4f822508c786a62248aea108 (patch) | |
tree | 8f6ba89f8dc30a5ad7d717f9c12a71b0bb97f076 /menu.c | |
parent | 42ab8c87973f2d7549ac939fc991138ed1ec537c (diff) | |
download | vdr-b38753888777a22e4f822508c786a62248aea108.tar.gz vdr-b38753888777a22e4f822508c786a62248aea108.tar.bz2 |
Implemented left/right/stereo selection
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.328 2005/01/05 10:26:59 kls Exp $ + * $Id: menu.c 1.329 2005/01/06 13:27:00 kls Exp $ */ #include "menu.h" @@ -2913,6 +2913,20 @@ eOSState cDisplayTracks::ProcessKey(eKeys Key) track++; timeout.Set(TRACKTIMEOUT); break; + case kLeft|k_Repeat: + case kLeft: + case kRight|k_Repeat: + case kRight: { + static int ac[] = { 1, 0, 2 }; + int AudioChannel = ac[cDevice::PrimaryDevice()->GetAudioChannel()]; + if (NORMALKEY(Key) == kLeft && AudioChannel > 0) + AudioChannel--; + else if (NORMALKEY(Key) == kRight && AudioChannel < 2) + AudioChannel++; + cDevice::PrimaryDevice()->SetAudioChannel(ac[AudioChannel]); + timeout.Set(TRACKTIMEOUT); + } + break; case kAudio: if (++track >= numTracks) track = 0; @@ -2924,7 +2938,8 @@ eOSState cDisplayTracks::ProcessKey(eKeys Key) timeout.Set(); break; case kNone: break; - default: return osEnd; + default: if ((Key & k_Release) == 0) + return osEnd; } if (track != oldTrack) { Show(); |