iOS sound dev - is this audio data I'm getting? #1475
ngocdh
started this conversation in
Bug Investigation
Replies: 2 comments 6 replies
-
Ok actually CSound is init() 4 times in CClient::Init() to check the sound card capabilities. However from the logs, I get 36 inits when app loads, and 4 inits when connecting... |
Beta Was this translation helpful? Give feedback.
4 replies
-
I wonder, since both iOS and Mac OS X use CoreAudio, with either the same or a very similar API, can't you just use most of the code of the current Mac OS X audio processing for iOS? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So as mentioned in pull request #1450, I'm trying to deal with iOS audio. But I have no dev experience (really!), apart from some basic dev lessons I took a long time ago. So I need your help.
It seems I managed to obtain audio data from the mic when connecting to a room, but I'm having trouble passing this data to CSoundBase::ProcessCallBack. Everytime this function is called, I have this error message:
on this line
bCallbackEntered = true
It's like the CSound object is not yet initialized, which is why I have an access error (not sure though).
So I put a printf in my CSound init function, and surprise: the printf is called a lot of times when the app loads, and once when I try to enter a room. And I thought this Sound object from Client.cpp is initialized only once? Have to check this again.
Anyway, this is how I got audio data from the mic:
I got 128 frames in ioData (4 bytes each), which I printed out like this
And got:
Notice it's not the full 128 frames. Any idea why?
And MOST IMPORTANT QUESTION of this post: do you think this is even valid audio data?
Beta Was this translation helpful? Give feedback.
All reactions