re: ioMainBuffer NULL
re: ioMainBuffer NULL
- Subject: re: ioMainBuffer NULL
- From: Tuviah Snyder <email@hidden>
- Date: Wed, 27 Mar 2013 05:20:14 +0000
- Thread-topic: ioMainBuffer NULL
Created a radar 13513346. Attached a crash log showing how even Apple's own audioserverplugin nullaudio sample will bring down coreaudiod on 10.8.3 with any application, including quicktime player X. I have no idea how Apple's other audioserverplugins are working if their own sample code crashes..
best
Tuviah
________________________________________
From: coreaudio-api-bounces+tuviahs=email@hidden [coreaudio-api-bounces+tuviahs=email@hidden] on behalf of email@hidden [email@hidden]
Sent: Tuesday, March 26, 2013 12:00 PM
To: email@hidden
Subject: Coreaudio-api Digest, Vol 10, Issue 102
Send Coreaudio-api mailing list submissions to
email@hidden
To subscribe or unsubscribe via the World Wide Web, visit
https://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. Re: Coreaudio-api Digest, Vol 10, Issue 101 (Tuviah Snyder)
2. Re: ioMainBuffer NULL? (Tuviah Snyder)
3. CoreAudio through bluetooth A2DP (Tony Kirke)
4. Buffer size change property? (Eric Gorouben)
5. Re: Buffer size change property? (Jeff Moore)
----------------------------------------------------------------------
Message: 1
Date: Mon, 25 Mar 2013 19:14:06 +0000
From: Tuviah Snyder <email@hidden>
To: "<email@hidden>" <email@hidden>
Subject: Re: Coreaudio-api Digest, Vol 10, Issue 101
Message-ID: <email@hidden>
Content-Type: text/plain; charset=us-ascii
I'm having the same issue. Sometimes ioMainBuffer will not be null, but the buffer must be invalid because doing a memcpy or memset on even 1 byte will cause an access exception!!
Sometimes even if I don't touch the buffer at all,it will crash in coreaudiod when it tries to apparently do an audio conversion on it..
This only happened since 10.8.3
I've had bad luck reporting bugs using radar. It takes weeks to get any reply. And this one is an urgent blocker. I suppose I need to open an Apple support incident?
best,
Tuviah
On Mar 25, 2013, at 12:00 PM, <email@hidden<mailto:email@hidden>>
wrote:
Message: 1
Date: Mon, 25 Mar 2013 10:52:45 -0700
From: Jeff Moore <email@hidden<mailto:email@hidden>>
To: Core Audio Mailing List <email@hidden<mailto:email@hidden>>
Subject: Re: ioMainBuffer NULL?
Message-ID: <email@hidden<mailto:email@hidden>>
Content-Type: text/plain; charset=us-ascii
There really isn't enough context here to answer your question.
--
Jeff Moore
Core Audio
Apple
------------------------------
Message: 2
Date: Mon, 25 Mar 2013 19:15:22 +0000
From: Tuviah Snyder <email@hidden>
To: "<email@hidden>" <email@hidden>
Subject: Re: ioMainBuffer NULL?
Message-ID: <email@hidden>
Content-Type: text/plain; charset=us-ascii
I'm having the same issue! Sometimes ioMainBuffer will not be null, but the buffer must be invalid because doing a memcpy or memset on even 1 byte will cause an access exception!!
Sometimes even if I don't touch the buffer at all,it will crash in coreaudiod when it tries to apparently do an audio conversion on it..
This only happened since 10.8.3
I've had bad luck reporting bugs using radar. It takes weeks to get any reply. And this one is an urgent blocker. I suppose I need to open an Apple support incident?
best,
Tuviah
On Mar 25, 2013, at 12:00 PM, <email@hidden<mailto:email@hidden>>
wrote:
Message: 1
Date: Mon, 25 Mar 2013 10:52:45 -0700
From: Jeff Moore <email@hidden<mailto:email@hidden>>
To: Core Audio Mailing List <email@hidden<mailto:email@hidden>>
Subject: Re: ioMainBuffer NULL?
Message-ID: <email@hidden<mailto:email@hidden>>
Content-Type: text/plain; charset=us-ascii
There really isn't enough context here to answer your question.
--
Jeff Moore
Core Audio
Apple
------------------------------
Message: 3
Date: Mon, 25 Mar 2013 20:10:59 -0700
From: Tony Kirke <email@hidden>
To: CoreAudio API <email@hidden>
Subject: CoreAudio through bluetooth A2DP
Message-ID:
<CAMOOhX7A+=VyJ293u4KtS4N_tSG8=email@hidden>
Content-Type: text/plain; charset="iso-8859-1"
First of all not sure if playing audio through bluetooth A2DP is consider
part of "CoreAudio" or not but can't really find the info I'm looking for
elsewhere. All of below applies to an iphone/ipad app and not to
CoreAudio/Bluetooth on a Mac.
Any help or pointers would be appreciated
An older build of my app on IOS 6 seemed to work fine when it was connected
to a bluetooth device. I was using the following code to enable this
UInt32 allowBluetoothInput = 1;
CheckError(
AudioSessionSetProperty(
kAudioSessionProperty_OverrideCategoryEnableBluetoothInput,
sizeof (allowBluetoothInput), &allowBluetoothInput),
"Cound't set OverrideCategoryEnableBluetoothInput");
}
Obviously this setup appears to be for both input & output audio through
bluetooth. Although I primarily want to play audio through bluetooth, this
worked fine prior to 6.1.x
However, now I am finding that the hardware sampling rate is getting set to
8khz and this makes audio run in a slowed down fashion since my app is not
resampling.
Also if I start up app while iphone "Music" app is playing over the
bluetooth connection with relatively good audio quality which seems to be
at 44.1khz, my app seems to change the bluetooth sampling rate to degrade
this audio too.
How can I take advantage of A2DP profile that Music app seems to be using
and have decent audio quality for music?
I tried to force sampling rate to 44.1khz but it didn't work.
Obvious above code is more intended for getting bluetooth microphone input
but I can not find info anywhere on how to use A2DP profile from within an
audio app
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.apple.com/mailman/private/coreaudio-api/attachments/20130325/b912ef56/attachment.html>
------------------------------
Message: 4
Date: Tue, 26 Mar 2013 14:23:41 +0100
From: Eric Gorouben <email@hidden>
To: CoreAudio API <email@hidden>
Subject: Buffer size change property?
Message-ID: <email@hidden>
Content-Type: text/plain; charset=iso-8859-1
Hi,
In the HAL plugin design, the buffer size changes used the kAudioDevicePropertyBufferFrameSize property.
This property doesn't seem to exist in the new audio server plugin implementation.
AudioServerPlugin.h:
> RequestDeviceConfigurationChange:
> When a plug-in's device object needs to change its structure or change any state related to IO for any reason, it must begin this operation by invoking this Host method.(...)The sorts of changes that must go through this mechanism are anything that affects either the structure of the device or IO. This includes (...), changing the size of the ring buffer...
While I can easily find the property associated with such changes in AudioHardwareBase.h (kAudioDevicePropertyNominalSampleRate, kAudioDevicePropertySafetyOffset
, etc) I can't find the mechanism for the buffer size.
How does in work?
Thanks
Eric
------------------------------
Message: 5
Date: Tue, 26 Mar 2013 10:42:00 -0700
From: Jeff Moore <email@hidden>
To: CoreAudio API <email@hidden>
Subject: Re: Buffer size change property?
Message-ID: <email@hidden>
Content-Type: text/plain; charset=us-ascii
On Mar 26, 2013, at 6:23 AM, Eric Gorouben <email@hidden> wrote:
> In the HAL plugin design, the buffer size changes used the kAudioDevicePropertyBufferFrameSize property.
> This property doesn't seem to exist in the new audio server plugin implementation.
That's correct. kAudioDevicePropertyBufferFrameSize represents the IO buffer size (in frames) for the client process. It is probably a non-intuitive thing, but this value actually has surprisingly little meaning for the server plug-in.
> AudioServerPlugin.h:
>> RequestDeviceConfigurationChange:
>> When a plug-in's device object needs to change its structure or change any state related to IO for any reason, it must begin this operation by invoking this Host method.(...)The sorts of changes that must go through this mechanism are anything that affects either the structure of the device or IO. This includes (...), changing the size of the ring buffer...
>
> While I can easily find the property associated with such changes in AudioHardwareBase.h (kAudioDevicePropertyNominalSampleRate, kAudioDevicePropertySafetyOffset
> , etc) I can't find the mechanism for the buffer size.
> How does in work?
Basically, your sever plug-in doesn't get to say anything about the IO buffer size for the client. That is by design as different clients can have different IO buffer sizes at the same time. For example, Logic might want an IO buffer size of 64 frames whereas iTunes is generally pretty happy with the default size of 512. The mix engine in the HAL handles dealing with the various buffer sizes and implementing the coloring algorithm to know when each client has actually provided the data for a given time segment.
The net effect is that the server plug-in has to be prepared for the fact that the HAL will call to read/write data of the various sizes that will come up as one client's IO cycle beats against another clients.
--
Jeff Moore
Core Audio
Apple
------------------------------
_______________________________________________
Coreaudio-api mailing list
email@hidden
https://lists.apple.com/mailman/listinfo/coreaudio-api
End of Coreaudio-api Digest, Vol 10, Issue 102
**********************************************
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden