Menu

acmod_process_raw returns 0

Help
2016-01-19
2016-01-22
  • Daniel Wolf

    Daniel Wolf - 2016-01-19

    I'm trying to align some words, similar to the test_state_align.c sample. My problem is that the very first call to acmod_process_raw returns 0, causing the processing loop to end. I can't figure out why -- I'm calling it with a valid buffer of 1600 samples.

    At the start of acmod_process_raw, the acmod structure has the following values:

    • acmod->n_mfc_alloc = 7
    • acmod->n_mfc_frame = 0
    • acmod->mfc_outidx = 0

    Thus, initially, ncep = 7.
    After fe_process_frames, ncep = 0.
    Thus, the line acmod->n_mfc_frame += ncep; leaves acmod->n_mfc_frame at 0.
    Finally, the line return acmod_process_mfcbuf(acmod); ultimately returns acmod->n_mfc_frame, which is 0 and ends my processing.

    I don't understand the code well enouth to figure out what went wrong. Any pointers would be great!

     
    • Nickolay V. Shmyrev

      I'm sorry, it is hard to understand. If original test code works and your doesnt it simply means you modified something wrong and need to revert the changes, isn't it?

      I wouldn't not rely on acmod_process_raw output value to end processing too, you could just process whole file from start to end.

       
  • Daniel Wolf

    Daniel Wolf - 2016-01-22

    Hi Nickolay,

    Thanks for your reply. I thought that when acmod_process_raw returned 0, this meant that it didn't accept the samples I gave it. I didn't realize I just had to keep on feeding it samples.

     

Log in to post a comment.