CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2012

    Audio frequency graph

    Hi masters in programming. I am a final year student in physics. I am trying to make an audio measurement program that will connect through a TMS320C542 DSKPLUS board from Texas Instrument by using C++ and i just started to do programming. I am so lost..

    I have this code with me that should show the graph of frequency when an audio is being recorded in real time. It cant really connect through a DSP yet because i still cant figure out how.

    This code i have should show the audio input's frequency through the PC soundcard. But then assertion failed error keep on coming out whenever i tried to build it. I am using Windows 98 OS pc and Visual Basic 6.0.

    This is the line that shows about assertion failed:

    // Begin sampling
    m_bRecording = TRUE;
    m_hThread = CreateThread(NULL,NULL,RecorderThreadFunc,this,NULL,NULL);
    ASSERT(m_hThread != NULL); (the line with assertion failed error)
    void Recorder::Stop()
    if(!m_bDeviceOpen || !m_bRecording)
    if(waveInStop(m_hWaveIn) != MMSYSERR_NOERROR)

    And at the call stack view, there are these sentences that i cant understand:

    Recorder::Start() line 182 + 34 bytes
    CWaveInFFTDlg::OnInitDialog() line 212
    AfxDlgProc(HWND__ * 0x000009d8, unsigned int 272, unsigned int 2568, unsigned int 2568) line 35 + 14 bytes
    KERNEL32! bff7363b()
    KERNEL32! bff94407()

    And i would like to ask for suggestion on how to make it able to communicate with the target DSKPLUS board through a parallel port. The DSK board i been using is obsolete now so i cant get any help from the TI page..

    I've been googling for 3 months plus and still cant find the solution. Hope u all can help me

  2. #2
    Join Date
    Oct 2006

    Re: Audio frequency graph

    Since m_hThread is NULL the call to CreateThread failed. Call GetLastError to find out why.
    See http://msdn.microsoft.com/en-us/libr...53(VS.85).aspx
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here

    Get your free MS compiler here

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.