Comments (12)
need this feature...
from theamazingaudioengine.
Hmm, can't attach patches on github? I'll paste it here below.
So basically, you just AUGraphStop(audioController.audioGraph) and then run AEAudioControllerRenderMainOutput() to render chunks of audio.
From aeae6ebae5043e1c74da624860c36fd9ba29b0ef Mon Sep 17 00:00:00 2001
From: Jonatan Liljedahl <[email protected]>
Date: Mon, 27 May 2013 14:28:07 +0200
Subject: [PATCH] Add AEAudioControllerRenderMainOutput()
---
TheAmazingAudioEngine/AEAudioController.h | 6 ++++++
TheAmazingAudioEngine/AEAudioController.m | 12 ++++++++++++
2 files changed, 18 insertions(+)
diff --git a/TheAmazingAudioEngine/AEAudioController.h b/TheAmazingAudioEngine/AEAudioController.h
index b2b0197..287b605 100644
--- a/TheAmazingAudioEngine/AEAudioController.h
+++ b/TheAmazingAudioEngine/AEAudioController.h
@@ -667,6 +667,12 @@ typedef void (*AEAudioControllerMainThreadMessageHandler)(AEAudioController *aud
*/
AudioUnit AEAudioControllerMainMixerUnit(AEAudioController *audioController);
+/*!
+ * Render main output into AudioBufferList.
+ * Use only while the AUGraph is not running.
+ */
+BOOL AEAudioControllerRenderMainOutput(AEAudioController *audioController, AudioTimeStamp inTimeStamp, UInt32 inNumberFrames, AudioBufferList *ioData);
+
///@}
#pragma mark - Filters
/** @name Filters */
diff --git a/TheAmazingAudioEngine/AEAudioController.m b/TheAmazingAudioEngine/AEAudioController.m
index 85471a8..0c9297c 100644
--- a/TheAmazingAudioEngine/AEAudioController.m
+++ b/TheAmazingAudioEngine/AEAudioController.m
@@ -1201,6 +1201,18 @@ AudioUnit AEAudioControllerMainMixerUnit(AEAudioController *audioController) {
return audioController->_topGroup->mixerAudioUnit;
}
+BOOL AEAudioControllerRenderMainOutput(AEAudioController *audioController, AudioTimeStamp inTimeStamp, UInt32 inNumberFrames, AudioBufferList *ioData) {
+ channel_producer_arg_t arg = {
+ .channel = audioController->_topChannel,
+ .inTimeStamp = inTimeStamp,
+ .ioActionFlags = 0,
+ .nextFilterIndex = 0
+ };
+ OSStatus result = channelAudioProducer((void*)&arg, ioData, &inNumberFrames);
+ handleCallbacksForChannel(arg.channel, &inTimeStamp, inNumberFrames, ioData);
+ return result;
+}
+
#pragma mark - Filters
- (void)addFilter:(id<AEAudioFilter>)filter {
--
1.7.10.2 (Apple Git-33)
from theamazingaudioengine.
Cheers Jonatan! That's a good start, but I would prefer to be able to avoid needing to access the audio unit directly like that. Maybe a couple of functions to start and stop the offline rendering process? I think we talked about the list of functions that would make a good interface over on the forum thread.
You can send code changes by creating a fork of your own, and then doing a pull request, by the way.
Sent from my iPhone
On 21/06/2013, at 5:30 AM, Jonatan Liljedahl [email protected] wrote:
Hmm, can't attach patches on github? I'll paste it here below.
So basically, you just AUGraphStop(audioController.audioGraph) and then run AEAudioControllerRenderMainOutput() to render chunks of audio.From aeae6ebae5043e1c74da624860c36fd9ba29b0ef Mon Sep 17 00:00:00 2001
From: Jonatan Liljedahl [email protected]
Date: Mon, 27 May 2013 14:28:07 +0200
Subject: [PATCH] Add AEAudioControllerRenderMainOutput()
TheAmazingAudioEngine/AEAudioController.h | 6 ++++++
TheAmazingAudioEngine/AEAudioController.m | 12 ++++++++++++
2 files changed, 18 insertions(+)diff --git a/TheAmazingAudioEngine/AEAudioController.h b/TheAmazingAudioEngine/AEAudioController.h
index b2b0197..287b605 100644
--- a/TheAmazingAudioEngine/AEAudioController.h
+++ b/TheAmazingAudioEngine/AEAudioController.h
@@ -667,6 +667,12 @@ typedef void (*AEAudioControllerMainThreadMessageHandler)(AEAudioController *aud
*/
AudioUnit AEAudioControllerMainMixerUnit(AEAudioController *audioController);+/*!
- * Render main output into AudioBufferList.
- * Use only while the AUGraph is not running.
- /
+BOOL AEAudioControllerRenderMainOutput(AEAudioController *audioController, AudioTimeStamp inTimeStamp, UInt32 inNumberFrames, AudioBufferList *ioData);
+
///@}
#pragma mark - Filters
/* @name Filters */
diff --git a/TheAmazingAudioEngine/AEAudioController.m b/TheAmazingAudioEngine/AEAudioController.m
index 85471a8..0c9297c 100644
--- a/TheAmazingAudioEngine/AEAudioController.m
+++ b/TheAmazingAudioEngine/AEAudioController.m
@@ -1201,6 +1201,18 @@ AudioUnit AEAudioControllerMainMixerUnit(AEAudioController *audioController) {
return audioController->_topGroup->mixerAudioUnit;
}+BOOL AEAudioControllerRenderMainOutput(AEAudioController *audioController, AudioTimeStamp inTimeStamp, UInt32 inNumberFrames, AudioBufferList *ioData) {
- channel_producer_arg_t arg = {
.channel = audioController->_topChannel,
.inTimeStamp = inTimeStamp,
.ioActionFlags = 0,
.nextFilterIndex = 0
- };
- OSStatus result = channelAudioProducer((void*)&arg, ioData, &inNumberFrames);
- handleCallbacksForChannel(arg.channel, &inTimeStamp, inNumberFrames, ioData);
- return result;
+}
#pragma mark - Filters
- (void)addFilter:(id)filter {
1.7.10.2 (Apple Git-33)
—
Reply to this email directly or view it on GitHub.
from theamazingaudioengine.
Yeah, I will do a fork and work some more on this when I find the time :)
But I don't expose any audio unit directly in this patch. However, another
change is shown in the diff context, which exposes the main mixer unit.
This is not needed for this though. The only thing needed is to stop and
resume the AUGraph, and the audioGraph is already exposed in the API. But
perhaps it would be better to encapsulate that into
AEAudioControllerBeginRendering() and AEAudioControllerStopRendering() just
in case we need to add some other state changes too.
On Fri, Jun 21, 2013 at 3:57 PM, Michael Tyson [email protected]:
Cheers Jonatan! That's a good start, but I would prefer to be able to
avoid needing to access the audio unit directly like that. Maybe a couple
of functions to start and stop the offline rendering process? I think we
talked about the list of functions that would make a good interface over on
the forum thread.You can send code changes by creating a fork of your own, and then doing a
pull request, by the way.Sent from my iPhone
On 21/06/2013, at 5:30 AM, Jonatan Liljedahl [email protected]
wrote:Hmm, can't attach patches on github? I'll paste it here below.
So basically, you just AUGraphStop(audioController.audioGraph) and then
run AEAudioControllerRenderMainOutput() to render chunks of audio.From aeae6ebae5043e1c74da624860c36fd9ba29b0ef Mon Sep 17 00:00:00 2001
From: Jonatan Liljedahl [email protected]
Date: Mon, 27 May 2013 14:28:07 +0200
Subject: [PATCH] Add AEAudioControllerRenderMainOutput()
TheAmazingAudioEngine/AEAudioController.h | 6 ++++++
TheAmazingAudioEngine/AEAudioController.m | 12 ++++++++++++
2 files changed, 18 insertions(+)diff --git a/TheAmazingAudioEngine/AEAudioController.h
b/TheAmazingAudioEngine/AEAudioController.h
index b2b0197..287b605 100644
--- a/TheAmazingAudioEngine/AEAudioController.h
+++ b/TheAmazingAudioEngine/AEAudioController.h
@@ -667,6 +667,12 @@ typedef void
(*AEAudioControllerMainThreadMessageHandler)(AEAudioController *aud
*/
AudioUnit AEAudioControllerMainMixerUnit(AEAudioController
*audioController);+/*!
- * Render main output into AudioBufferList.
- * Use only while the AUGraph is not running.
- /
+BOOL AEAudioControllerRenderMainOutput(AEAudioController
*audioController, AudioTimeStamp inTimeStamp, UInt32 inNumberFrames,
AudioBufferList *ioData);
+
///@}
#pragma mark - Filters
/* @name Filters */
diff --git a/TheAmazingAudioEngine/AEAudioController.m
b/TheAmazingAudioEngine/AEAudioController.m
index 85471a8..0c9297c 100644
--- a/TheAmazingAudioEngine/AEAudioController.m
+++ b/TheAmazingAudioEngine/AEAudioController.m
@@ -1201,6 +1201,18 @@ AudioUnit
AEAudioControllerMainMixerUnit(AEAudioController *audioController) {
return audioController->_topGroup->mixerAudioUnit;
}+BOOL AEAudioControllerRenderMainOutput(AEAudioController
*audioController, AudioTimeStamp inTimeStamp, UInt32 inNumberFrames,
AudioBufferList *ioData) {
- channel_producer_arg_t arg = {
- .channel = audioController->_topChannel,
- .inTimeStamp = inTimeStamp,
- .ioActionFlags = 0,
- .nextFilterIndex = 0
- };
- OSStatus result = channelAudioProducer((void*)&arg, ioData,
&inNumberFrames);- handleCallbacksForChannel(arg.channel, &inTimeStamp, inNumberFrames,
ioData);- return result;
+}
+
#pragma mark - Filters- (void)addFilter:(id)filter {
1.7.10.2 (Apple Git-33)
—
Reply to this email directly or view it on GitHub.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/21#issuecomment-19817220
.
/Jonatan
http://kymatica.com
from theamazingaudioengine.
+1
from theamazingaudioengine.
Has any further progress been made on this?
Thanks,
Luke
from theamazingaudioengine.
Really need this~
Thanks~
from theamazingaudioengine.
Not sure if this enhancement is planned or not? It would be a great feature.
from theamazingaudioengine.
I'm working on this for TAAE2 - nearly done, just not quite yet.
from theamazingaudioengine.
@michaeltyson Is there any update on this? I can help with the implementation if you give me some tips regarding the implementation's idea.
Btw. Really great work with TAAE2. 👏
from theamazingaudioengine.
It's done: http://theamazingaudioengine.com/doc2/interface_a_e_audio_file_output.html#details
Thank you! =)
from theamazingaudioengine.
!!!
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.