Windows MP3/song player that caches whole song in RAM before playing - diyAudio
Go Back   Home > Forums > Source & Line > Digital Source

Digital Source Digital Players and Recorders: CD , SACD , Tape, Memory Card, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 23rd September 2007, 01:32 AM   #1
Daveis is offline Daveis  United States
diyAudio Member
 
Join Date: Dec 2003
Location: Des Moines, IA
Default Windows MP3/song player that caches whole song in RAM before playing

Is there a MP3/song/media player that can set the size of the the RAM buffer for the song to any large value?

My Windows PC plays songs through ASIO and some nice DAC's. I'm even running my crossover on the PC. But my final issue is that sometimes while reading songs from disc I get a little click/hiccup. I've tracked down the cause to most likely the RAID controller setting its PCI latency above the sound card. I've had partial luck with playing with PCI latency tools. And that approach seems unecessary when I have so much RAM in my PC (4GB).

So if anyone wants to contribute a .Net, VB, C++ program that can read an entire song, or even entire CD's worth of music into RAM and play it let me know.

Normally, I'd say something like Foobar2000 would be good, but even that has a limit on the RAM buffer. Besides.... its interface isn't spartan enough for me.

Thought about the FMOD's sound library in conjunction with VB or .Net, but there's a learning curve with that.

I'd prefer ASIO output too... so it seems that I'm on my own for making such a beast.

The main knowledge I lack to be able to do that is how to read the song into RAM from a number of different sound formats, the most important for me is WMA-lossless,WAV,MP3.

I hate reinventing the wheel, but no one out there is doing this and it seems so trivial to just allow a really big RAM buffer for songs.
  Reply With Quote
Old 23rd September 2007, 04:24 AM   #2
Daveis is offline Daveis  United States
diyAudio Member
 
Join Date: Dec 2003
Location: Des Moines, IA
Found a simple song player that uses the FMOD-EX sound library at http://jerome.jouvie.free.fr/index.php .

Nice little java program that uses the FMOD-EX stuff.

I've contacted the author to see if he will modify his program to cache songs entirely from memory.

I would have contacted the foobar author, but the software is so popular I doubt my enhancement request would be taken seriously.

It's amazing, but apparently I'm the only person who has experienced this problem.

When I play music streamed from an external 300-disc Sony jukebox I have almost no music hiccups. But when I play from my Promise SATA RAID card I have occasional dropouts.

When I played songs from single motherboard connected SATA drives I never had any problems. It was only when I went to a PCI RAID card that I started to have problems.

So maybe the solution is to switch from a RAID card to large individual drives?

Another thought...

If you are playing songs from RAM, how is any hardware, OS any better than any other? How often would a PCI sound cards buffer experience an under run?
  Reply With Quote
Old 23rd September 2007, 07:19 AM   #3
diyAudio Member
 
Join Date: Sep 2005
Maybe useful:

http://www.ramdisk.tk/
  Reply With Quote
Old 23rd September 2007, 07:27 AM   #4
diyAudio Moderator
 
pinkmouse's Avatar
 
Join Date: Apr 2002
Location: Chatham, England
Shifting audio from a HD is a relatively low overhead task that shouldn't cause glitches these days on any half reasonable PC. I suspect a windoze problem - old/badly written drivers, broken OS, interrupt settings or similar.
__________________
Rick: Oh Cliff / Sometimes it must be difficult not to feel as if / You really are a cliff / when fascists keep trying to push you over it! / Are they the lemmings / Or are you, Cliff? / Or are you Cliff?
  Reply With Quote
Old 23rd September 2007, 08:34 AM   #5
Daveis is offline Daveis  United States
diyAudio Member
 
Join Date: Dec 2003
Location: Des Moines, IA
Quote:
Originally posted by pinkmouse
Shifting audio from a HD is a relatively low overhead task that shouldn't cause glitches these days on any half reasonable PC. I suspect a windoze problem - old/badly written drivers, broken OS, interrupt settings or similar.
The Promise FastTrack S150 SX4 RAID controller drivers and firmware are a few years old. Promise has never updated the firmware or drivers for the card. That's not necessarily a bad thing. It could be that they didn't find any problems.

I have 4 300GB SATA150 drives connected to the controller.
I suspect that rather than my PC being broken that its actually too good in some respects.

I've benchmarked the RAID read rates on my PC and have discovered that I am actually bottlenecked by the speed of the 32-bit PCI bus. When my RAID volume is being read it is transferring 115MB/second. So for that brief moment the PCI bus is saturated.

If the hard drive controller interrupt isn't released in time, then the sound card will get starved for data and I'll get and under run condition that results in an audio hiccup.

Device Manager tells me that my sound card (RME9652) is sharing an IRQ with my video card. So its not IRQ sharing thats the problem.

It could be that the priority of the hard drive controller is just higher than the sound card. Or it could be that the IRQ latency is too high.

I've played with the PCI latency tool ( http://downloads.guru3d.com/download.php?det=951 ), but found it is flaky and some previous versions of that tool have caused Blue Screens. So I don't necessarily trust that tool.

I've also read that its not recommended to change hard drive controller latencies. People are only recommending changing video card latencies.

If anything I'd blame my RME card for not having a bigger RAM buffer. The max buffer size/latency I can set for the card is 8192 samples.
  Reply With Quote
Old 23rd September 2007, 12:48 PM   #6
jives11 is offline jives11  Europe
diyAudio Member
 
jives11's Avatar
 
Join Date: Mar 2004
Location: Hampshire
Quote:
Originally posted by Daveis






Device Manager tells me that my sound card (RME9652) is sharing an IRQ with my video card. So its not IRQ sharing thats the problem.

Hmmm, I would probably have assumed that WAS the problem. I'd try and get the Sound on a seperate IRQ from either video, raid or network.

I have spent a lot of time tweaking my sons ancient 6 year old PC to get recent 3-d games to work to an acceptable degree. PC has no AGP or PCI-E , so graphics is PCI only and he likes to play recent games like STALKER. While not the same issue as yours there are some similarities. I resorted to disabling devices in the BIOS (Parallel printer port, serial port, anything I didn't need). This seemed to free up some IRQ's after boot. I also had to play with PCI slots i.e which one I connected varied how XP assigned IRQ's with the uPnP.

Also the resident part of most Virus checkers is well known to screw with I/O. I run AVG but on my "tweaked" PC I disabled the resident stuff. More risky from a virus viewpoint BUT I do run a full check once a day. It also boosted the IO b/marks by approx 10%.


This guide is excellent IMHO

http://www.tweakguides.com/TGTC.html
  Reply With Quote
Old 23rd September 2007, 04:50 PM   #7
Daveis is offline Daveis  United States
diyAudio Member
 
Join Date: Dec 2003
Location: Des Moines, IA
Quote:
Originally posted by jives11
I also had to play with PCI slots i.e which one I connected varied how XP assigned IRQ's with the uPnP.

Also the resident part of most Virus checkers is well known to screw with I/O.
This is good general IRQ setting advice...

My motherboard only has two PCI slots and they are occupied by the RAID controller and RME sound card. If I changed slots I'd bet that I'd force the sound card to share IRQ's with the hard drive controller. Those are the two devices I want to keep separated the most.

Virus checkers... I've always thought they were a driving force behind performance conscious users gripes about Windows.

I've had multiple motherboards during the time I've had the same video card, sound card, and RAID controller. The problem started as soon as I put my music collection on RAID. And it has persisted across TWO motherboards.

I am hesitant to blame the Promise RAID controller. In 3 years, it has never caused any data corruption on my 900+ GB volume. The system works fine when playing songs from RAM or streamed from sound card inputs.

I may in the end ditch the RAID card and switch to Windows software mirrored drives on a new motherboard that has more internal SATA channels. (Only have 4 now)

Some people would say you need to dedicate a HTPC, but the problem is I want my HTPC to also be my file server PC.
Also, this machine stays up for weeks at a time with no major problems encountered.

Some of the antivirus packages seem to initiate virus scans seemingly randomly. Kaspersky and Trend Micro will see that the system is idle and start scanning. Symantec would do that to a lesser degree. The best was AVG for not scheduling file scans just because. Although, AVG gets lesser marks for finding viruses than the more well known antivirus software.
  Reply With Quote
Old 24th September 2007, 01:19 PM   #8
macboy is offline macboy  Canada
diyAudio Member
 
Join Date: Oct 2003
Location: Ottawa, Canada
Any decent motherboard will let you set the PCI latency in the BIOS. Try to find it. set it to 32 or so and the problem may go away.

Note that even if you cache hours' worth of MP3 files to RAM, you can and almost certainly will still experience this audio hiccup. It will happen any time the disks are accessed, whether for MP3 files or something else. Sorry.

I don't know what kind of mobo you are using, but I have always had bad luck with VIA chipsets. I have simply come to believe that VIA's PCI implementation is just plain broken. I have had audio dropouts, poor performance, unresolvable conflicts, etc. But my boards with SiS or Intel chipsets have always been stellar with none of those problems using exactly the same PCI cards. I haven't tried an Nvidia board yet. I will never again buy another VIA board. There are so many other great options that I just can't be bothered.
  Reply With Quote
Old 25th September 2007, 01:13 AM   #9
Daveis is offline Daveis  United States
diyAudio Member
 
Join Date: Dec 2003
Location: Des Moines, IA
Quote:
Originally posted by macboy
Any decent motherboard will let you set the PCI latency in the BIOS. Try to find it. set it to 32 or so and the problem may go away.

Note that even if you cache hours' worth of MP3 files to RAM, you can and almost certainly will still experience this audio hiccup. It will happen any time the disks are accessed, whether for MP3 files or something else. Sorry.

I don't know what kind of mobo you are using, but I have always had bad luck with VIA chipsets. I have simply come to believe that VIA's PCI implementation is just plain broken. I have had audio dropouts, poor performance, unresolvable conflicts, etc. But my boards with SiS or Intel chipsets have always been stellar with none of those problems using exactly the same PCI cards. I haven't tried an Nvidia board yet. I will never again buy another VIA board. There are so many other great options that I just can't be bothered.
Turns out that my Asus Nforce4 based system doesn't allow me to set IRQ or latencies. I think that's typical of Award Phoenix BIOS.

True. Point taken. Since any hard drive access will stop the sound card. Antivirus, Tivo background download, anything will have the same effect. My caching plan will just make the problem less pronounced.

On a PC, the file server machine probably needs antivirus. If you have a lot of storage you start to not want to risk losing them to a virus. So the machine with the music files is going to have anti virus and that's contrary to realtime music streaming.

I suppose the solution then is a dedicated sound processing PC that has no antivirus, just sound card and in my case crossover. Stream files over the network. I could still use a large RAM buffer and I believe even Windows Media Player 11 can set the buffer to 60 seconds.

I'm using an Nvidia chipset motherboard. I, too, have not liked Via boards. Intel chipset boards are generally very solid.
  Reply With Quote
Old 25th September 2007, 05:27 AM   #10
jives11 is offline jives11  Europe
diyAudio Member
 
jives11's Avatar
 
Join Date: Mar 2004
Location: Hampshire
Quote:
Originally posted by Daveis



On a PC, the file server machine probably needs antivirus. If you have a lot of storage you start to not want to risk losing them to a virus. So the machine with the music files is going to have anti virus and that's contrary to realtime music streaming.

I suppose the solution then is a dedicated sound processing PC that has no antivirus, just sound card and in my case crossover. Stream files over the network. I could still use a large RAM buffer and I believe even Windows Media Player 11 can set the buffer to 60 seconds.

With AVG I can still have scheduled scans and updates (i.e at night, every night) BUT disable the resident shield components which interfere with all I/O activities. It's a compromise, but would seem to satisfy both requirements i.e detection of viruses but also more predictable I/O.
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Most depressing song? Wombat Music 173 25th June 2007 05:21 PM
Can anyone identify this song Tekko Music 1 3rd January 2007 09:18 PM
3 song CD player... rabbitz Digital Source 2 20th July 2005 07:19 AM
do you know this song? kinser Music 3 16th June 2004 12:57 PM


New To Site? Need Help?

All times are GMT. The time now is 05:40 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright ©1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2