Guest User

Untitled

a guest
Jun 17th, 2008
419
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. Test for gapless playback:
  2.  
  3. 1) First, edit /etc/asound.conf and add the following sections:
  4.  
  5. pcm.pcmfile {
  6. type file
  7. slave.pcm "default"
  8. file "/tmp/alsa.pcm"
  9. perm 0644
  10. }
  11.  
  12. ctl.pcmfile {
  13. type hw
  14. card 0 # or card 1 if you're using your second souncard, etc...
  15. }
  16.  
  17. 2) Take any 16-bit, 44.1kHz stereo FLAC file (i.e. ripped from a CD), let's call it "input.flac". Issue the following in a terminal:
  18.  
  19. for i in 0 1 2 3 4 5; do let "j = i + 1"; flac -s --no-seektable --fast -f -o "part${j}.flac" --skip=00:${i}0.00 --until=00:${j}0.00 "input.flac"; done
  20.  
  21. 3) That command generated six small FLAC files: they are 10 second chunks from the beginning of input.flac. Load them in your favorite music player (ONLY those files).
  22. 4) Change the ALSA device in your player's playback configuration to "pcmfile" (it's probably set to "default" or somesuch), and disable any sound processing, such as Replay Gain. Make sure neither your player or your sound card resamples audio (i.e. make sure it can ouput 44.1kHz audio natively).
  23. 5) Play the files you loaded up (hit the Play button). Wait until all 6 files are played.
  24. 6) Go back to the terminal, and issue the following (change the input.flac's path as needed):
  25.  
  26. flac -s --no-seektable --fast -f -o "a.flac" --skip=00:01.00 --until=00:59.00 "input.flac"
  27. flac -s --no-seektable --fast -f -o "b.flac" --skip=00:01.00 --until=00:59.00 --force-raw-format --endian=little --channels=2 --bps=16 --sample-rate=44100 --sign=signed "/tmp/alsa.pcm"
  28. metaflac --show-md5sum "a.flac" "b.flac"
  29.  
  30. 7) That last command shows the MD5 sum of input.flac and ALSA's output, minus one second at the beginning and at the end of both files (to account for any problem related to starting and stopping playback). If they match, your player's gapless playback implementation is fine, as far as track transition goes, anyway.
  31.  
Advertisement
Add Comment
Please, Sign In to add comment