Comments (8)
Hey @soareschen - Thanks for the kind words! Would you mind grabbing the latest changes and trying again? I believe @rklaver has identified and resolved the issue in my absence!
from theamazingaudioengine.
Hi @michaeltyson,
I guess @rklaver's patch would solve the problem, provided that the preferred hardware rate is guaranteed to be configurable after the audio session is activated.
What I don't understand is the followed snippet when the hardware sample rate setting failed. Why change the asbd's sample rate to the current hardware sample rate? I believe core audio would run just fine despite the asbd's sample rate is different from the current hardware sample rate?
Soares
from theamazingaudioengine.
That's updated because AEAudioController's audioDescription needs to reflect the audio description that's currently in use - if the sample rate achieved isn't the one requested, it needs to be updated to reflect what's actually in use. Otherwise it runs the risk of introducing audio artefacts due to the incorrect sample rate.
from theamazingaudioengine.
Actually, that's not entirely true: I haven't tested this, but the mixer may automatically perform sample rate conversion. I'm not sure, though.
from theamazingaudioengine.
The remoteIO unit performs any conversion needed, including sample rate,
depending on the audio descriptions set for the app-side of the unit.
That is: The stream format set on the output scope of element 1 (audio in) decides
the format you get when pulling audio from the hardware input. And the stream format set on the input scope of element 0 (audio out) decides the format you should write to the buffers for hardware output.
So, all you need to do is to tell it what format you wish to work with in
your app, and you don't need to care about the actual hardware format
(including sample rate, number of channels, etc..)
I thought this was what AEAudioController's audioDescription was for? Or
where exactly is that used, for the input format or output format? And is
the inputAudioDescription matching the actual hardware format, or the
client side format set on the output scope of element 1?
In a similar matter, the multichannel mixer unit performs conversion if the
stream format of the inputs are different than the stream format of the
output.
from theamazingaudioengine.
I think this might be a misconception on my part: I thought the hardware sample rate dictates what sample rate the IO unit delivers. If it has sample rate conversion facilities, then I've taken the wrong approach when the delivered hardware sample rate isn't the same as the requested one!
from theamazingaudioengine.
Fixed with SHA 7bdb02a
from theamazingaudioengine.
Thanks for fixing the issue. Glad that we resolved the confusion and found the right way to configure the ASBD.
from theamazingaudioengine.
Related Issues (20)
- 1.5.7 not on Cocoapods HOT 2
- Open the dome,Bluetooth speakers will automatically stop working? HOT 1
- How can I set the preferredInput? Everytime I change it, it sets it back to previous.
- Stop doesn't work if the audioDescription preferred sampleRate is different than detected
- user AEAudioController Empty my control center
- Using play through channel ,but need to delay the playing
- Prepare and begin recording
- Is TheAmazingAudioEngine possible to perform audio synthesis?
- Can only record m4a type ? HOT 1
- 请问一下theamazingaudioengine 录音的时候如何过滤扬声器声音 HOT 2
- Hi, I need to create a visualizer like ZLHistogramAudioPlot. I try to use this code
- Create ZLHistogramAudioPlot like visualizer using TheAmazingAudioEngine
- React Native version?
- regionStartTime not work
- 可以绘制音波图吗
- Crash AEUtilities.h -[AEAudioController teardown] HOT 1
- demo 不清楚怎么使用的 可以讲一下吗
- Multiple samples not playing at the same time in iOS 14 HOT 5
- `AEAudioBufferListGetLength ()` has a incorrect implementation HOT 2
- How to export modified audio file?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from theamazingaudioengine.