Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: MP3/MPlayer extention 0.4.4 available



> | I've made a small diff (for Version 1.0.1)
> |
> | http://217.115.144.27/~praml/vdr-1.0.1-mp3-soundcard.diff

I had a quick look at it, and
think you will lose a replayBuffer object if you are replaying something and
then start mp3 mode.
    }

+#if DVB_OUT
   if(!Recording()) {
     StopTransfer();

     StopReplay();   <--- will delete replayBuffer if any  , but is not
active because DVB_OUT is not defined for
soundcard output

     if(fd_video >= 0 && fd_audio >= 0) {
+#endif
       replayBuffer = new cMP3playBuffer(this, fd_video, fd_audio, plist);
<----------old replayBuffer is lost in space
       if(replayBuffer) return true;
       else esyslog(LOG_ERR, "ERROR: can't allocate MP3 replaying buffer");
+#if DVB_OUT
       }
     }
+#endif

Many actions call the StopReplay method of CDVBApi. so with your patch it
isnt possible to do mp3 playing and recording at the same time, you even
lose memory ;-).

> | The PCM data is sent through a pipe to 'aplay' (or any other
> | player that accepts s16_be (stereo 16 bit big-endian) PCM data)

I did last evening a quick n dirty hack to output the sound to /dev/dsp
myself
Its quite easy, i just studied madplay sources how to do this.

> |
> | Before and after MP3 playing, I execute a command to set/mute the SPDIF
> | of the soundcard. (my hardware setup:
> | DVB-SPDIF ----> CM8738 ----> SPDIF in of Amplifier
> | So, I only need one SPDIF connection to the amp.)

Hmm this would be useless for me;-) have no SPDIF on amp

> |
> | The main advantage is that the sound is more clearly (no clicks on
> | OSD activity) and the card isn't blocked for recording (i didn't try
that
> | yet)

The first is right, the second would be nice but , your patch isnt
suffiecient for that.
The whole vdr vode assumes it is not possible to output sound and do record,
or replay of video at the same time
and therefore calls StopReplay at many places, which kills the current
replayBuffer.

> |
> | Disadvantage:
> | the latency is increased a little bit because of the buffer in aplay. (~
> 0.5
> | sec)
My solution has no latency  i think, but i just hacked it in too see if i
could do it ;-)
i now thinking about the easiest way to let vdr record while replaying mp3
files...



regards,
gunnar







Home | Main Index | Thread Index