Re: AUCarbonViewBase destructor problems
Re: AUCarbonViewBase destructor problems
- Subject: Re: AUCarbonViewBase destructor problems
- From: Robert Grant <email@hidden>
- Date: Fri, 9 Jul 2004 11:48:30 -0400
Now that Rax 1.0 is out it seems like Rax 0.3.3b1 should be laid to a
well deserved rest! :-) I would not consider it a good host for
validation. Rax 1.0 is much better but it also is not a perfect AU
host. So make sure you test with a variety - especially
AudioUnitHosting as most have some quirks because of the way windows
and views are managed in each!
Best,
Robert.
On Jul 9, 2004, at 11:32 AM, Luke Bellandi wrote:
On Jul 9, 2004, at 7:35 AM, Jeremy Todd wrote:
Hi,
I'm creating an AudioUnit and testing it under Rax v0.3.3b. I'm
inheriting AUCarbonViewBase to create a UI, and when I close the UI's
window then my destructor is invoked (the base destructor is virtual,
as mentioned earlier on this list).
When I have my plugin's UI open and I press command-Q to quit Rax, I
get a "do you want to save changes" dialog. When I press "don't save"
then the window appears to close without invoking AUCarbonViewBase's
destructor. Thus I believe my view component is not closed before the
window is destroyed, violating the AudioUnit spec (?). This leads to
crashes and all sorts of nasty things since my UI needs to be
properly shut down before its window disappears.
Are you seeing the same behavior when you try using the Carbon views
that Apple ships, like the Graphic EQ View? I've tried that view in
Rax v1.0.6, and I'm not seeing these problems.
I'm hoping I've done something wrong, but if not any ideas how to
handle this situation across all AU hosts?
Regards,
Jeremy
On Jul 9, 2004, at 1:00 AM, email@hidden
wrote:
Send coreaudio-api mailing list submissions to
email@hidden
To subscribe or unsubscribe via the World Wide Web, visit
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
or, via email, send a message with subject or body 'help' to
email@hidden
You can reach the person managing the list at
email@hidden
When replying, please edit your Subject line so it is more specific
than "Re: Contents of coreaudio-api digest..."
Today's Topics:
1. Question about afrecord.cpp (Stan Jou)
2. Re: Question about afrecord.cpp (Mark Cookson)
3. Re: Core Audio SDK 1.3.1 (Olof Westman)
From: Stan Jou <email@hidden>
Date: July 8, 2004 4:34:26 PM EDT
To: email@hidden
Subject: Question about afrecord.cpp
Hi everyone,
First of all, the AudioFileTools example in CoreAudioSDK 1.3.1
compiles and runs on my PB 12" (latest model)/OS X 10.3.4/Xcode 1.2.
(, after fixing some private/protected methods to public...)
So I tried to modify it for my own use.
By the way, the input of sound pane in System Preferences
is set to Internal Microphone.
Here comes the problem:
In CoreAudio/Services/AudioFileTools/afrecord.cpp,
the sampling rate is set (?) in a line
dataFormat.mSampleRate = 44100.; // later get this from the
hardware
When I changed 44100 to 16000,
afrecord compiles but seems not working.
It only outputs a 4096 byte file.
Another problem is that when I tried to change the line
file.Create(recordFileName, kAudioFileAIFFType);
from kAudioFileAIFFType to kAudioFileWAVEType
afrecorder compiles but doens't run with an Error shown:
Error: create audio file ('fmt?')
That part of code seems audio format settings to me,
so I'm confused why it doesn't work.
Could you please tell me where I missed or misunderstood?
Thank you,
Stan.
From: Mark Cookson <email@hidden>
Date: July 8, 2004 5:26:23 PM EDT
To: email@hidden
Subject: Re: Question about afrecord.cpp
On Jul 8, 2004, at 3:34 PM, Stan Jou wrote:
Here comes the problem:
In CoreAudio/Services/AudioFileTools/afrecord.cpp,
the sampling rate is set (?) in a line
dataFormat.mSampleRate = 44100.; // later get this from
the hardware
When I changed 44100 to 16000,
afrecord compiles but seems not working.
It only outputs a 4096 byte file.
Does the built in hardware on your computer actually support 16000?
I suspect that it does not and that you're getting an error when you
attempt to record in an unsupported format. You can verify the
supported formats in Audio MIDI Setup or IORegistry Explorer
(preferred).
You'll need to use an audio unit to convert the sample rate to 16k
from whatever the hardware supports.
--
Mark Cookson
M-Audio
225 Locust St.
Hudson, WI 54016
From: Olof Westman <email@hidden>
Date: July 9, 2004 2:02:51 AM EDT
To: email@hidden
Subject: Re: Core Audio SDK 1.3.1
The 1.3.1 SDK example code is really great. Unfortunately, I can't
use it under 10.2.8 unless I embark on a search-&-destroy mission
for
things that weren't present in 10.2.8 - such as AudioChannelLayout
which is not defined in the Jaguar CoreAudioTypes.h.
In my case, this was a daunting obstacle to face because I wondered,
"How deep does THIS iceberg go?" - especially when
AudioChannelLayouts
are the first things referenced in the CAAudioFile 'init' function.
My compiler complains: "In file included from CAAudioFile.h:13,
CAAudioChannelLayout.h:29: error: parse error before `&' token"
and so on... Obviously, I am doing SOMETHING wrong... but what?
Actually, 'afplay' DOES compile with my Xcode 1.2 SDK 1.3.1 install
with the build selection set to 10.2.8. However, my project, which
makes use of some of this code, does NOT build - although the same
source with a 10.3 OS build-setting DOES. The upside to all this
is the
knowledge that, "It's only software..." and that there IS a solution
to all my immediate whoopdeedoo. I have no complaints except with
my
own limited skill and knowledge regarding how best to deal with
things.
Lance Drake
I have the same kind of problem. What is it that we do wrong?
/Olof W
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.