SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

Sound PCM Stream Effects

Hi, these files demonstrate a basic usage of doing graphic effects on a stereo 16bit PCM stream. One example is on mp3 streams which can be passed through the graph procedure with the command:

mpg123 -s soundfile.mp3 | ./faradoom

WARNING: DireShow uses svgalib and DMA to it. On my system it runs Ok BUT svgalib can be dangerous. I take no responsibility for crashes. In the 'bad case' even if the system looks crashed, try CTRL-ALT-DEL, linux kernel never crashes and faradoom does not grab the keyboard.

The source here is rather useful as a sample start-point for better effects, the effects included are rather clumpsy (but optimized though). Shows are nice but they can be done much more impressive.

Drawing refresh is 5.8 msec for long window and 2.9 msec for short window.

Suggested song to test this: When the Music's Over

These files can show you:

  • How to setup a soundcard.
  • Ultra fast DMA VGA graphics.
  • IPC shared memory and semaphores stuff.
  • Multiprocessing.
  • How to work with a sliding window in time domain.

In turn I learned all those nice things from:

  • Doom sources (i_video.c)
  • Hacked doom's i_video.c for SVGAlib by Peter Tsantoulis
  • sox (raw.c, oss.c) Q: Who the heck is FaraDoom?
    1. You don't wanna know. It has something to do with the pyramids though.
    2. What CPU one needs?
    3. For time domain display, even a 386 should be fine (but it can't play mp3s). In the frequency domain, my poor old P166 seemed to be in trouble for 1024 values per shared memory segment -- i.e. 768 values for a time window. However this window size is not an option; large window is 512 and short window is 256. If you encounter problems try the -DINTEGER_SINCOS gcc option in the compilation of drawing.c. Hack and optimize.
    4. Hey! For some values in the arguments some frequencies disappear!
    5. Perfectly logical. Expected and not to worry about. Its linear to log conversion of discrete things. Everything Ok.
    6. Help, I get "i shmget:: Invalid argument". What is this?
    7. The program was terminated abnorally right? There are shared memory segments and semaphores to be removed. Use the command 'ipcs' to see them. Then use the command 'ipcrm' to remove 4 shm and 1 sem.

dire, dir, a. [L. dirus, terrible.]
Dreadful; dismal; horrible; terrible; evil in a great degree.--direful,
dIr'ful, a. Same as Dire.--direfully,
dIr'ful*li, adv. In a direful manner.-- direly, dIr'li, adv. In a dire manner. --direness, dIr'nes, n. The state or
quality of being dire. (Shak.)


I'm Stelios Xanthakis (hi!)
Contact me at: <axanth@tee.gr>
for requests, comments, ideas and stuff.

221 C-Ya!


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.