-
Notifications
You must be signed in to change notification settings - Fork 555
Closed
Labels
bugIf an issue is a bug or a pull request a bug fixIf an issue is a bug or a pull request a bug fixiOSIssues affecting iOSIssues affecting iOSmacOSIssues affecting macOSIssues affecting macOS
Milestone
Description
var format = new AVAudioFormat (AVAudioCommonFormat.PCMFloat32, 44100.0, 2, true);
Console.WriteLine (format.StreamDescription.Format);
Console.WriteLine (format.StreamDescription.FormatFlags);
Console.WriteLine (format.StreamDescription.BytesPerPacket);
Console.WriteLine (format.StreamDescription.FramesPerPacket);
Console.WriteLine (format.StreamDescription.BytesPerFrame);
Console.WriteLine (format.StreamDescription.ChannelsPerFrame);
Console.WriteLine (format.StreamDescription.BitsPerChannel);
Console.WriteLine (format.StreamDescription.Reserved);
2020-06-18 12:02:45.633956-0500 AudioBuff[1879:21497389] 0
2020-06-18 12:02:45.634350-0500 AudioBuff[1879:21497389] 0
2020-06-18 12:02:45.634754-0500 AudioBuff[1879:21497389] 0
2020-06-18 12:02:45.634901-0500 AudioBuff[1879:21497389] 0
2020-06-18 12:02:45.635068-0500 AudioBuff[1879:21497389] 0
2020-06-18 12:02:45.635216-0500 AudioBuff[1879:21497389] 0
2020-06-18 12:02:45.635389-0500 AudioBuff[1879:21497389] 0
2020-06-18 12:02:45.635532-0500 AudioBuff[1879:21497389] 0
compare to
AVAudioFormat * format = [[AVAudioFormat alloc] initWithCommonFormat:AVAudioPCMFormatFloat32 sampleRate:44100.0 channels:2 interleaved:YES];
const AudioStreamBasicDescription * d = [format streamDescription];
NSLog (@"%d", d->mFormatID);
NSLog (@"%d", d->mFormatFlags);
NSLog (@"%d", d->mBytesPerPacket);
NSLog (@"%d", d->mFramesPerPacket);
NSLog (@"%d", d->mBytesPerFrame);
NSLog (@"%d", d->mChannelsPerFrame);
NSLog (@"%d", d->mBitsPerChannel);
NSLog (@"%d", d->mReserved);
2020-06-18 11:27:52.814242-0500 AudioBuffTest[1323:21473545] 1819304813
2020-06-18 11:27:52.814513-0500 AudioBuffTest[1323:21473545] 9
2020-06-18 11:27:52.814759-0500 AudioBuffTest[1323:21473545] 8
2020-06-18 11:27:52.815011-0500 AudioBuffTest[1323:21473545] 1
2020-06-18 11:27:52.815264-0500 AudioBuffTest[1323:21473545] 8
2020-06-18 11:27:52.815464-0500 AudioBuffTest[1323:21473545] 2
2020-06-18 11:27:52.815717-0500 AudioBuffTest[1323:21473545] 32
2020-06-18 11:27:52.815952-0500 AudioBuffTest[1323:21473545] 0
The ObjC defination:
typedef struct AudioStreamBasicDescription AudioStreamBasicDescription;
@property (nonatomic, readonly) const AudioStreamBasicDescription *streamDescription;
our binding
[Export ("streamDescription")]
AudioStreamBasicDescription StreamDescription { get; }
generates
ret = global::ObjCRuntime.Messaging.AudioStreamBasicDescription_objc_msgSend (this.Handle, Selector.GetHandle ("streamDescription"));
I think this is the source of the bug.
Happens in 13.18 and master
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIf an issue is a bug or a pull request a bug fixIf an issue is a bug or a pull request a bug fixiOSIssues affecting iOSIssues affecting iOSmacOSIssues affecting macOSIssues affecting macOS