The Naked Scientists

The Naked Scientists Forum

Author Topic: How Does Windows Media Player Play My CD At The Same Time As Ripping It ?  (Read 3100 times)

Offline neilep

  • Withdrawnmist
  • Naked Science Forum GOD!
  • *******
  • Posts: 20602
  • Thanked: 8 times
    • View Profile



With one laser ( I assume) ..how does Windows Media player manage to play my CD at the same time that it is ripping tracks from it that are further down the playlist ?

I thought it might be playing the ripped version but no...when I take the CD out it stops playing the track !

Can ewe help me understand this ?

thanks

neil
xxx


 

Offline RD

  • Neilep Level Member
  • ******
  • Posts: 8128
  • Thanked: 53 times
    • View Profile
I think the heard audio is from a temporary memory store called a buffer or cache.

Quote
Buffers are often used in conjunction with I/O to hardware, such as disk drives, sending or receiving data to or from a network, or playing sound on a speaker. A line to a rollercoaster in an amusement park shares many similarities. People who ride the coaster come in at an unknown and often variable pace, but the roller coaster will be able to load people in bursts (as a coaster arrives and is loaded). The queue area acts as a buffer: a temporary space where those wishing to ride wait until the ride is available. Buffers are usually used in a FIFO (first in, first out) method, outputting data in the order it arrived
http://en.wikipedia.org/wiki/Buffer_%28telecommunication%29#Applications

While you're listening the audio temporarily stored in memory, the computer is free to read other parts of the CD,
(the computer is able to read audio data from the CD in a fraction of the time it takes to hear it played). 

« Last Edit: 09/03/2010 18:37:16 by RD »
 

Offline Geezer

  • Neilep Level Member
  • ******
  • Posts: 8328
  • "Vive la résistance!"
    • View Profile
I imagine the entire track that is being ripped is read into memory before the program starts the MP3 encoding process. The encoding process is rather CPU intensive, so most of the ripping time does not involve reading the CD. That leaves plenty of time for the CD playing process to run as a lower priority task. The replay process hardly uses any CPU or CD read time.

I think!
 

Offline RD

  • Neilep Level Member
  • ******
  • Posts: 8128
  • Thanked: 53 times
    • View Profile
I imagine the entire track that is being ripped is read into memory

The heard audio buffer need not store the entire audio track, a chunk equivalent to a few tens of seconds of audio would be sufficient, like ye-olde DiscmanTM ...

Quote
When first introduced, 3 seconds was the maximum buffering time. As of 2006 times range from 10 seconds to "skip-free," where the player will rarely skip.
http://en.wikipedia.org/wiki/Electronic_skip_protection
« Last Edit: 09/03/2010 22:39:05 by RD »
 

Offline Geezer

  • Neilep Level Member
  • ******
  • Posts: 8328
  • "Vive la résistance!"
    • View Profile
RD - As you point out, the playback track does not need to be buffered much at all, but the track that is being encoded does. I don't know the details of MP3 encoding, so I'm not sure how much "look ahead" the sw needs, but I suspect it is quite substantial.
 

The Naked Scientists Forum


 

SMF 2.0.10 | SMF © 2015, Simple Machines
SMFAds for Free Forums
 
Login
Login with username, password and session length