And when you need to pause? Then it would play for 30 seconds
Stop me if someone has already thought of this...but I'd like some input on what you think the cost/complexity and usefulness of this project would be. I want to build a decent size audio buffer (30 seconds? a minute? two minutes?). To make it an addon external to the soundcard, the buffer would probably have to be placed at the soundcard's output. It would keep the last minute of audio stored. Normally, when the computer is booted (perhaps signalled by a serial line....or even better some sort of algorithm to sense when sound was coming out of the soundcard), the buffer would be bypassed and would simply continually store the current sound in a first in first out fashion. However, when the unit senses no sound from the soundcard and..say...the pulse from the PWR_ON of the computer, it would begin playback from the buffer until the computer finishes booting. Sure, you would hear what you already heard, but it wouldn't be silence while the computer was booting. It would give the impression of an instant boot. I suppose one problem with this system is that the software would need to be advanced enough to resume playback only when the buffer is empty. To me, it sounds like an interesting project, but I'm not sure if the time/cost is really worth the benefit. Anyone with experience in this area have any input? Without getting into some serious hardware development and hacking of an mp3 player, I can't think of a way to do a read ahead buffer. It makes me wonder if there are any commercial products for this application.
Oh - I forgot to mention. This would all have to be done with some sort of NVRAM...the idea is to have zero power usage while the system is off.
Playback from the buffer would be triggered by sensing a no audio condition in conjunction with a PWR_ON signal from the switch or DC-DC supply. It would not be activated at a simple pause.
Novel solution to a persistent problem... There are alot of issues to take into account, though. Such as:
-It would have to support high-quality audio. Considering it is a passthrough device, it would need to support at least the quality of music that your sound card supports.
-What happens if the computer boot time is less than the devices memory? How do we sync everything up again so there is no skipping? (We obviously do not want any delay in audio output from the computer)
-Nonvolatile memory has a limited lifespan... The device would need to store to regular RAM, then when the power switch is triggered, dump it to the NVRam and turn off.
-Programming. How difficult is it to sample audio and without compressing it, dump it into memory? (and read it out to another jack...) I have no idea how to do this....
I'd love to get into PIC programming and whatnot, but this seems like more than a newb program... I'll (attempt to) design the circuit if someone wants to make the chip!
CarPC Stolen. Starting over.
Ne1 recognize the avatar?
This is probably going to be the most difficult to work with. There's times when my computer boots quickly, and then slows when launching my media. Other times, it might take a little while to actually boot, but then the media starts going before I even see my frontend. And how would you differentiate from the windows boot sounds, and the music? (you could always turn off the boot sounds, but just throwing it out there.)Originally Posted by PatO
Very interesting idea, if you could do it, it would solve some of the problems that are inherent with these systems.
2000 Subaru OBS
Dell P3 @ 900 Mhz
7" Lilliput TS w/DigitalWW in-dash mount
80GB External HD
I am Zero Bitrate....
The device will have to have some sort of logic on it to determine when the buffer is empty. From there, it's easy. Scenario:Originally Posted by PatO
1) you press shutdown button on computer.
2) button triggers record mode on device. computer continually plays music until it recieves a buffer full signal from device. (presumably a minute after you leave the car...shouldn't be too much for the battery to handle)
3) Playback pauses, computer begins to shutdown, state of playlist is saved.
4) Upon power on, audio is drawn from the buffer instead of the computer. Once computer is up and running, it waits for buffer empty signal from buffer and resumes playback from where it left off.
We don't need to continually store audio...see my solution above. A minute delay before shutdown could be a good hack around it.Originally Posted by PatO
I've also never attempted anything to this scale. I'm an electrical engineering student and feel like this shouldn't be totally out of my reach, but my experience is limited to working with handyboards and introductory microcontroller classes.Originally Posted by PatO
an alternate route could be to hack up a cheap mp3 player. when shutdown of the computer is detected, auto upload the rest of the song that is currently playing. it would suck if you were 98% of the way through a song...but would still be useful. Come to think of it...my iriver has line-in recording...Originally Posted by PatO
By the way...as far as control interface for this is concerned, I'm thinking serial would be the easiest...though it could be fun to play with USB. You wouldn't need much...hell...you could even hack up a cheap USB gamepad and wire to the buttons to signal your playback finished. Obviously there would have to be a system software side of this...I'm thinking winamp plugin to handle the pausing/resuming. I guess something like girder could be used as a go-between. LiRC could be even better...maybe do a little linux compatibility. MUXing the buffer output and the soundcard output shouldn't be an issue either.
Even more thoughts:
though it's more than I'm really willing to spend on this project...it kinda lends itself to GUMSTIX as a platform....www.gumstix.com
Sampling a soundcard's output and playing it back later will degrade the quality quite a lot. It'd be better to hack whatever's doing the music decoding and write about half a minute's worth of audio data to ram somewhere, and use a microcontroller to read it out of ram and output the stream to a DAC. The circuit will probably look something like a modified version of a homebrew mp3 player, minus the mp3 decoding coprocessor.
I think that's pretty complicated in itself. Also syncing the end of the stored audio stream with the next chunk of audio will be extremely difficult... we're pretty sensitive to glitches in sound and getting two independent systems to synchronise is not easy. It might actually be less annoying to make the transition obvious: fade sound in and out.
Instead of doing all of this, maybe it'd be easier to cheat?
Speed up your boot time by doing something like powering up your computer when you open your car door instead of when you start your engine. That'll give you a few more seconds of boot up time... Mercedes' COMAND system does that..
But there'll be some false power ons in that situation as well...
maybe i'll try design door powerup into a shutdown controller someday..