KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am trying to decode an Opus file back to raw 48 kHz. However I am unable to find any sample code to do that. My current code is this: void COpusCodec::Decode(unsigned char* encoded, short* decoded, unsigned int len) { int max_size=960*6;//not sure about this one int error; dec = opus_decoder_create(48000, 1, &error);//decode to 48kHz mono int frame_size=opus_decode(dec, encoded, len, decoded, max_size, 0); } The argument "encoded" might be larger amounts of data, so I think I have to split it into frames. I am not sure how I could do that. And with being a beginner with Opus, I am really afraid to mess something up. Could anybody perhaps help?
Tags (comma-separated)
Save Edits
Cancel