Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

obtain data to create spectrum visualisation for cd audio player

hello,

i work to made an audio cd player on windows plateform.
at the moment, i use essentialy mci calls from win32 sdk,
but i don't think how obtain data to create spectrum
visualisation for cd audio player...

anyone can help me please?

thanks.

Emmanuel Verlynde

(emmanuel.verlynde@opendisc.net)

Comments

  • JediJedi Member Posts: 1
    It depends on what platform are you using. Since you are using Win32 SDK, i will explain on Win32 platform and using MSVCPP.

    There are two ways to do it.

    The first way is, you play the CD by using simple MCI commands, and then simultaneously record the samples by waveform audio input device (waveInOpen, waveInPrepareHeader etc), and then render the audio buffer to the screen.

    The second way, or the harder way is, reading the audio data directly from CDDA. MCI calls read audio data from the CD and send directly to the sound card without bothering on the software control. So we cannot see and thus display the audio data in any forms. To get the audio data and able to see and manipulate the samples, we need to read audio data directly from CD Audio. Windows programmer usually do it by using WINASPI library (winaspi32.dll). Don't bother to use this stuff, but you can use CDDA ripper libraries (Akrip is the best i've ever seen) (http://akrip.sourceforge.net/) to help you communicate with the CD and pass you the PCM samples in the form of waveform file (*.wav). (Or you can make CDDA ripper on your own if you got the concept ! )

    To display the visualisation, you have to manipulate the samples in memory rather than storing it into waveform file (Unless you want to convert from .cda to .wav or .mp3). By doing this, you can render the samples to screen as an oscilloscope wave or by displaying a spectrum analyser. The latter needs one more process (but need more CPU speed). You have to do some FFT onto the audio samples to get freq and dbs domains. The best FFT source code i've ever seen is Frequency Analyzer from Reliable Software (http://www.relisoft.com/freeware/index.htm).

    Give it a try!

    Thanks -- Jedi (jd_azura@yahoo.com)
    ______________________________________
    Buktikan orang kita boleh !


    : hello,
    :
    : i work to made an audio cd player on windows plateform.
    : at the moment, i use essentialy mci calls from win32 sdk,
    : but i don't think how obtain data to create spectrum
    : visualisation for cd audio player...
    :
    : anyone can help me please?
    :
    : thanks.
    :
    : Emmanuel Verlynde
    :
    : (emmanuel.verlynde@opendisc.net)
    :

  • Andre YoungAndre Young USAMember Posts: 0

    ________ \ http://forcoder.org \ free video tutorials and ebooks about \ Scratch Go R C++ Ruby Perl Python Delphi JavaScript Visual Basic PL/SQL MATLAB Java PHP Swift Visual Basic .NET C Objective-C C# Assembly LabVIEW SAS ABAP Fortran Transact-SQL Rust FoxPro Alice Bash Lua Apex Hack Scala Dart Crystal Logo Ada Erlang Awk Prolog Kotlin Lisp Clojure D Scheme Julia F# COBOL VBScript ML \ _________

Sign In or Register to comment.