Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NodeRecorder audioDataCallback update interval #2899

Open
myreauks opened this issue Feb 22, 2024 · 0 comments
Open

NodeRecorder audioDataCallback update interval #2899

myreauks opened this issue Feb 22, 2024 · 0 comments
Labels

Comments

@myreauks
Copy link

myreauks commented Feb 22, 2024

macOS Version(s) Used to Build

macOS 13 Ventura

Xcode Version(s)

Xcode 15

Description

Using Audiokit 5.6.2 the interval at which NodeRecorder's audioDataCallBack is executed is 100ms, instead of the buffer length. In this case recording from iPhone mic, the length is always 4410. I believe this should be much more frequent if I have bufferLength set to .short?

Related topic on StackOverflow:
https://stackoverflow.com/questions/77258786/execution-frequency-of-audiokit-rawdatatap-is-lower-than-expected-after-update

Also most probably related to #2860 which for whatever reason did not fix the problem for AudioDataCallBack in NodeRecorder.

Here is example code:

recorder = try NodeRecorder(
                    node: input,
                    fileDirectoryURL: getDocumentsDirectory().appendingPathComponent("Sounds"),
                    shouldCleanupRecordings: false
                ) 
                
                recorder?.audioDataCallback = { audioData, _ in
                        let length = UInt(audioData.count)
                        print(length)
                }

Best,
Miro

Crash Logs, Screenshots or Other Attachments (if applicable)

No response

@myreauks myreauks added the bug label Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant