diff options
author | Johns <johns98@gmx.net> | 2013-04-11 12:03:38 +0200 |
---|---|---|
committer | Johns <johns98@gmx.net> | 2013-04-11 12:03:38 +0200 |
commit | 9dd248f9d0ad9df9cc3413b2ba92dcbc03aa8fd3 (patch) | |
tree | 22c355b8eaeb15e0c82fdf37aeb5ea61afd0772e | |
parent | 238224efc84ab2eb66f7328c19c3f815626c50aa (diff) | |
download | vdr-plugin-softhddevice-9dd248f9d0ad9df9cc3413b2ba92dcbc03aa8fd3.tar.gz vdr-plugin-softhddevice-9dd248f9d0ad9df9cc3413b2ba92dcbc03aa8fd3.tar.bz2 |
Enable seamless audio track change.
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | audio.c | 7 |
2 files changed, 6 insertions, 2 deletions
@@ -1,6 +1,7 @@ User johns Date: + Enable seamless audio track change. Fix bug #1302: Unsupported pixel format crash. Fix the fix, when sillpicture is called in suspend mode. Fix crash, when sillpicture is called in suspend mode. @@ -678,8 +678,7 @@ static int AudioRingAdd(unsigned sample_rate, int channels, int passthrough) } AudioRingWrite = (AudioRingWrite + 1) % AUDIO_RING_MAX; - // FIXME: don't flush buffers here - AudioRing[AudioRingWrite].FlushBuffers = 1; + AudioRing[AudioRingWrite].FlushBuffers = 0; AudioRing[AudioRingWrite].Passthrough = passthrough; AudioRing[AudioRingWrite].PacketSize = 0; AudioRing[AudioRingWrite].InSampleRate = sample_rate; @@ -689,6 +688,9 @@ static int AudioRingAdd(unsigned sample_rate, int channels, int passthrough) AudioRing[AudioRingWrite].PTS = INT64_C(0x8000000000000000); RingBufferReset(AudioRing[AudioRingWrite].RingBuffer); + Debug(3, "audio: %d ring buffer prepared\n", + atomic_read(&AudioRingFilled) + 1); + atomic_inc(&AudioRingFilled); #ifdef USE_AUDIO_THREAD @@ -2417,6 +2419,7 @@ void AudioFlushBuffers(void) int i; old = AudioRingWrite; + // FIXME: check ring buffer overflow AudioRingWrite = (AudioRingWrite + 1) % AUDIO_RING_MAX; AudioRing[AudioRingWrite].FlushBuffers = 1; AudioRing[AudioRingWrite].Passthrough = AudioRing[old].Passthrough; |