Skip to content

Best Method to Encode Many Sounds to one WAV File #620

Answered by cdigit
cdigit asked this question in Q&A
Discussion options

You must be logged in to vote

I got it to work! I had the wrong format on the second ma_encoder that I used to write it to disk! I might be learning something after all! This is how I did it below.
Questions:

  • I don't understand how pBufferRef3 is the correct channel count and format when I did not initialize it?
  • How can I find out when to stop the loop instead of hardcoding an arbitrary value in the while condition?
void writeWav(){
    // logic to set the seek_to position and start & and times for all sounds to their recorded positions  
    // ...
    
    // todo: init the encoder before this function is called.
    ma_encoder encoder2;
    char * outputFile = "/Users/me/Documents/outall.wav";
    ma_encoder_config 

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by cdigit
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant