Bug 6714 - AudioQueueEnqueueBufferWithParameters is private
Summary: AudioQueueEnqueueBufferWithParameters is private
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 5.2
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-08-27 16:46 UTC by Matt Crocker
Modified: 2012-10-16 18:57 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
monotouch.zip (1.58 MB, application/zip)
2012-10-16 05:54 UTC, Rolf Bjarne Kvinge [MSFT]
Details
monotouch.zip take 2 (1.58 MB, application/zip)
2012-10-16 18:57 UTC, Rolf Bjarne Kvinge [MSFT]
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Matt Crocker 2012-08-27 16:46:39 UTC
The advanced form of AudioQueue.EnqueueBuffer is marked private. Not sure if this is intentional or just got left out.

EnqueueBuffer (IntPtr audioQueueBuffer, AudioStreamPacketDescription [] desc,
	int trimFramesAtStart, int trimFramesAtEnd, AudioQueueParameterEvent [] parameterEvents,
	ref AudioTimeStamp startTime, out AudioTimeStamp actualStartTime)

https://github.com/mono/maccore/blob/master/src/AudioToolbox/AudioQueue.cs#L428

Would be great to get this added. Thanks!
Comment 1 Miguel de Icaza [MSFT] 2012-09-01 15:55:46 UTC
This is now part of the ios6 branch for maccore.

Going to backport this to 5.4branch after 5.4.0 goes out.
Comment 2 adam.lickel 2012-10-15 20:27:05 UTC
There's a problem with the bindings.
Specifically, startTime should take null as a valid value.
As it's a ref to a struct, I can not pass in null. 

From: https://developer.apple.com/library/mac/#documentation/MusicAudio/Reference/AudioQueueReference/Reference/reference.html

inStartTime
The desired start time for playing the buffer. To specify a time relative to when the audio queue started, use the mSampleTime field of the AudioTimeStamp structure. Use NULL to indicate that the buffer should play as soon as possible—which may be after previously queued buffers finish playing.
Buffers play in the order they are enqueued (first in, first out). If multiple buffers are queued, the start times must be in ascending order or NULL; otherwise, an error occurs. This parameter specifies when audio data is to start playing, ignoring any trim frames specified in the inTrimFramesAtStart parameter.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2012-10-16 05:54:15 UTC
Created attachment 2752 [details]
monotouch.zip

Adam, I've added an overload that does not take a startTime parameter.

Attached is an updated monotouch.dll you can use to try this out (based on the upcoming 6.0.5 release, but I do not expect any problems if you use it with 6.0.4) - just unzip into /Developer/MonoTouch/usr/lib/mono/2.1 (you might want to backup your existing monotouch.dll[.mdb] just in case).

master: bdf5ebc4c98637e22683db3bf7074f43c96f9c61
ios6: b4f7b43c94105aebbb877c155f442f9dbcd5c0fc
Comment 4 adam.lickel 2012-10-16 13:32:21 UTC
Hi Rolf,

There was no new AudioQueue.EnqueueBuffer() method in the DLLs you sent me.
Both compiling and browsing the class hierarchy did not show a new method as far as I can tell.
Comment 5 Rolf Bjarne Kvinge [MSFT] 2012-10-16 18:57:15 UTC
Created attachment 2755 [details]
monotouch.zip take 2

It looks like I messed up something, here is another try.