![]() |
Radio buffer / timeshift
Hi there,
I was thinking about buying something like this, a radio which has a delay function so you can do "timeshift" with it (with this, I can delay / pause the sound for a couple of seconds so I can watch any sports on TV synced with the FM radio commentary)... ...and then I thought of my beloved N900 which has saved me so many times before doing things my Android phone can't. Would it be possible to write the FM radio output to a buffer or something like that, effectively "pausing" the radio stream so I can listen to it a couple of seconds "behind" live streaming? I know it's possible to do this with live stations on the web, but they're already too much delayed, so I need this done with the FM receiver. Any thoughts? And of course, thank you as always! :) |
Re: Radio buffer / timeshift
Quote:
Code:
gst-launch pulsesrc device=sink.hw0.monitor |
Re: Radio buffer / timeshift
Thank you very much for the answer, but I want to avoid streaming as it would induce a delay of a couple of seconds already, and anyway, I suppose I could do what you're telling me in an easier way with the phonestreamer app and then delay the incoming on the other device.
I'm looking for a solution in the phone, with just the phone. If I had two devices I could always just connect a jack between the N900 and the other thing and then delay the audio with VLC, which is what I already do when I'm at home, so as I'm telling you, what I'm looking for is a solution using only the N900. Anyway, thank you again! |
Re: Radio buffer / timeshift
Quote:
I tested what comes first to my mind (warning: it is not yet working) Connect headset for antenna, start qradio and start playing. Then on terminal: Code:
gst-launch autoaudiosrc device=hw:1 ! audioconvert ! queue min-threshold-time=1000000000 ! autoaudiosink -> You will hear audio two times and it has bad snapping (not even smooth echo). I don't know how to continue with that. b) modify code of e.g. qradio. I already fetched the code, but didn't understand how it works. Couple of other radio application listed on wiki: http://maemo.org/packages/view/cfmradio/ http://maemo.org/packages/view/fmradio/ c) Compile gstplugin: v4l2radio e.g. from harmattan: Code:
git clone git@gitorious.org:harmattan-projects/gst-plugins-good.git Harmattan use newer gstreamer, so plugin might need code modifications and then it could work. And use it: http://harmattan-dev.nokia.com/docs/...v4l2radio.html I'm not sure would it then just work. There are example for Ubuntu where audio comes from mic and goes to speaker: http://ubuntuforums.org/showthread.php?t=1189559 |
Re: Radio buffer / timeshift
Thank you VERY much, I think this is great progress.
I'm not a developer (I just know basics of C and little else), but I'll look into the code and try to see if anything comes to my mind. :) |
Re: Radio buffer / timeshift
In cfmradio, just change cfmradio.c:430 to
Code:
g_object_set(G_OBJECT(radio), "output", CFM_RADIO_OUTPUT_MUTE, NULL); It would not be very hard to add a fixed delay to cfmradio itself (you just need to buffer up the raw audio data before forwarding to speakers), but you will indeed need some C and basic audio processing knowledge. |
Re: Radio buffer / timeshift
Noob alert: I've had some free time but I've not been able to compile cfmradio for the N900 :(. I tried compiling the (modified) source using make, after installing build-essential-tools, but no luck.
Could you perhaps point me in the right direction here? Thank you very much :) |
Re: Radio buffer / timeshift
Quote:
If you are already using scratchbox, then you should install maemo-sdk-dev before continuing. |
All times are GMT. The time now is 20:22. |
vBulletin® Version 3.8.8