Bug 36812 - audioconverter-requirespacketdescriptionserror-pkd-or-outdatapacketdescription-is-not-null
Summary: audioconverter-requirespacketdescriptionserror-pkd-or-outdatapacketdescriptio...
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 9.2
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Future Cycle (TBD)
Assignee: Alex Soto [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2015-12-10 09:48 UTC by renan jegouzo
Modified: 2016-05-11 14:14 UTC (History)
3 users (show)

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

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 renan jegouzo 2015-12-10 09:48:41 UTC
https://forums.xamarin.com/discussion/17872/audioconverter-requirespacketdescriptionserror-pkd-or-outdatapacketdescription-is-not-null
same bug as this one, but I need a realtime audioconverter to get pcm samples live in the app.
so I can't replace the AudioConverter buggy implementation by queues API as suggested in the forum.

when do you plan to finally fix the wrapping of AudioToolbox.AudioConverter.FillComplexBuffer ?
for me AudioConverter works mp3->pcm but not aac->pcm, I got the 
Exception: "ref argument outDataPacketDescription has to be set"
that means nothing in apple documentation.

I have this bug on: aTV, OSX and iOS..
Comment 1 renan jegouzo 2015-12-10 10:01:46 UTC
sample project: http://share.aestesis.org/TestAudioConverter.zip
aac stream that always raise exception: http://uwstream3.somafm.com:9010

Xamarin Studio
Version 5.10.1 (build 6)
Installation UUID: 2a46676f-5eb8-4569-9aa7-630cd15bdfc2
Runtime:
	Mono 4.2.1 (explicit/6dd2d0d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010102

Xamarin.Profiler
Not Installed

Apple Developer Tools
Xcode 7.1.1 (9081)
Build 7B1005

Xamarin.iOS
Version: 9.2.1.54 (Business Edition)
Hash: eb4c1ef
Branch: master
Build date: 2015-12-01 02:12:30-0500

Xamarin.Android
Version: 6.0.0.34 (Business Edition)
Android SDK: /Volumes/ssd/android-sdk-macosx
	Supported Android versions:
		4.2 (API level 17)
		5.1 (API level 22)
		6.0 (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

Xamarin Android Player
Not Installed

Xamarin.Mac
Version: 2.4.0.109 (Business Edition)

Build Information
Release ID: 510010006
Git revision: 0b60eecdb531933734519c13257d16a780274aab
Build date: 2015-12-04 20:28:20-05
Xamarin addins: 9876fd7c9837977178411ec7375b4352c0a0d6af
Build lane: monodevelop-lion-cycle6-baseline

Operating System
Mac OS X 10.11.1
Darwin macbook.home 15.0.0 Darwin Kernel Version 15.0.0
    Sat Sep 19 15:53:46 PDT 2015
    root:xnu-3247.10.11~1/RELEASE_X86_64 x86_64
Comment 3 renan jegouzo 2015-12-11 14:00:50 UTC
some streams that are prohibited by xamarin wrapper:

http://107.155.126.58:8122/
http://165.230.36.186:8002/
http://165.230.36.186:8100/
http://170.75.145.138:16364/
http://174.123.20.134:8000/
http://174.142.175.230:8136/
http://174.142.175.230:8160/
http://174.142.175.230:8200/
http://174.142.175.230:8204/
http://174.142.175.230:8253/
http://184.171.242.78:6192/
http://188.138.0.251:64010/
http://192.95.16.140:12146/
http://192.99.150.31:8377/stream
http://192.99.150.31:8721/stream
http://192.99.17.61:9994/
http://192.99.200.78:12098/
http://195.154.217.103:8019/stream
http://195.154.72.66:443/
http://198.105.216.204:8088/pulzarfm
http://198.105.216.204:8134/stream
http://198.199.113.134:8076/
http://205.164.35.153:80/
http://205.164.35.3:80/
http://205.164.62.21:7706/
http://205.164.62.22:7018/
http://208.77.21.31:14930/
http://208.77.21.33:16730/
http://208.77.21.33:16830/
http://212.83.143.231:9920/
http://216.87.171.48:9166/
http://31.220.43.235:80/
http://37.187.79.56:2670/showtime
http://37.59.254.27:8026/
http://67.213.221.48:9080/
http://69.46.90.243:3895/
http://70.84.15.212:8000/
http://70.84.15.212:8005/
http://78.129.163.140:8228/
http://78.129.178.98:8129/
http://78.129.228.187:8034/
http://78.129.228.187:8048/
http://80.86.106.136:80/
http://82.94.166.122:8180/
http://86.123.111.7:9055/
http://91.121.164.186:9360/
http://91.121.18.185:5750/
http://91.121.18.185:5850/
http://91.121.89.153:4450/
http://94.76.216.200:8210/
http://94.76.216.200:8212/
http://95.154.254.81:12939/
http://ar.canstream.co.uk:8003/live.aac
http://ar.canstream.co.uk:8004/live.aac
http://ar.canstream.co.uk:8005/live.aac
http://cast.sc3.shoutcaststreaming.us:9010/
http://ice.somafm.com/jollysoul-32.aac
http://ice.somafm.com/jollysoul-64.aac
http://ice.somafm.com/xmasrocks-32.aac
http://icy1.abacast.com:80/kplu-jazz24aac-64
http://listen.gaydio.co.uk:8000/gaydio.aac
http://live.demonfm.co.uk:8000/demon48
http://radio.canstream.co.uk:8041/live.aac
http://sc7.spacialnet.com:22018/
http://uwstream2.somafm.com:2102
http://uwstream2.somafm.com:2202
http://uwstream2.somafm.com:2204
http://uwstream2.somafm.com:2402
http://uwstream2.somafm.com:2500
http://uwstream2.somafm.com:3000
http://uwstream2.somafm.com:5102
http://uwstream2.somafm.com:5104
http://uwstream2.somafm.com:5106
http://uwstream2.somafm.com:6104
http://uwstream2.somafm.com:6106
http://uwstream2.somafm.com:6602
http://uwstream2.somafm.com:6604
http://uwstream2.somafm.com:8044
http://uwstream2.somafm.com:8046
http://uwstream2.somafm.com:8070
http://uwstream2.somafm.com:8072
http://uwstream2.somafm.com:8074
http://uwstream2.somafm.com:8104
http://uwstream2.somafm.com:8200
http://uwstream2.somafm.com:8204
http://uwstream2.somafm.com:8208
http://uwstream2.somafm.com:8402
http://uwstream2.somafm.com:8404
http://uwstream2.somafm.com:8504
http://uwstream2.somafm.com:8508
http://uwstream2.somafm.com:8510
http://uwstream2.somafm.com:8602
http://uwstream2.somafm.com:8606
http://uwstream2.somafm.com:8804
http://uwstream2.somafm.com:8806
http://uwstream2.somafm.com:8808
http://uwstream2.somafm.com:8854
http://uwstream2.somafm.com:8856
http://uwstream2.somafm.com:8858
http://uwstream2.somafm.com:8906
http://uwstream2.somafm.com:8908
http://uwstream2.somafm.com:8910
http://uwstream2.somafm.com:8950
http://uwstream2.somafm.com:9002
http://uwstream2.somafm.com:9006
http://uwstream2.somafm.com:9010
http://uwstream2.somafm.com:9010/
http://uwstream2.somafm.com:9012
http://uwstream2.somafm.com:9014
http://uwstream2.somafm.com:9092
http://uwstream2.somafm.com:9094
http://uwstream2.somafm.com:9192
http://uwstream2.somafm.com:9194
http://uwstream2.somafm.com:9196
http://uwstream2.somafm.com:9292
http://uwstream2.somafm.com:9294
http://uwstream2.somafm.com:9296
http://uwstream2.somafm.com:9902
http://uwstream2.somafm.com:9904
http://uwstream3.somafm.com:2102
http://uwstream3.somafm.com:2202
http://uwstream3.somafm.com:2204
http://uwstream3.somafm.com:2500
http://uwstream3.somafm.com:2502
http://uwstream3.somafm.com:2802
http://uwstream3.somafm.com:2804
http://uwstream3.somafm.com:2806
http://uwstream3.somafm.com:3000
http://uwstream3.somafm.com:5102
http://uwstream3.somafm.com:5104
http://uwstream3.somafm.com:6102
http://uwstream3.somafm.com:6104
http://uwstream3.somafm.com:6106
http://uwstream3.somafm.com:6202
http://uwstream3.somafm.com:6204
http://uwstream3.somafm.com:6602
http://uwstream3.somafm.com:6604
http://uwstream3.somafm.com:8070
http://uwstream3.somafm.com:8072
http://uwstream3.somafm.com:8074
http://uwstream3.somafm.com:8080
http://uwstream3.somafm.com:8200
http://uwstream3.somafm.com:8204
http://uwstream3.somafm.com:8208
http://uwstream3.somafm.com:8302
http://uwstream3.somafm.com:8504
http://uwstream3.somafm.com:8508
http://uwstream3.somafm.com:8510
http://uwstream3.somafm.com:8602
http://uwstream3.somafm.com:8606
http://uwstream3.somafm.com:8950
http://uwstream3.somafm.com:9002
http://uwstream3.somafm.com:9006
http://uwstream3.somafm.com:9010
http://uwstream3.somafm.com:9012
http://uwstream3.somafm.com:9014
http://uwstream3.somafm.com:9092
http://uwstream3.somafm.com:9094
http://uwstream3.somafm.com:9802
http://uwstream3.somafm.com:9804
http://xstream1.somafm.com:2102
http://xstream1.somafm.com:2202
http://xstream1.somafm.com:2204
http://xstream1.somafm.com:2500
http://xstream1.somafm.com:2502
http://xstream1.somafm.com:2802
http://xstream1.somafm.com:2804
http://xstream1.somafm.com:2806
http://xstream1.somafm.com:3000
http://xstream1.somafm.com:5100
http://xstream1.somafm.com:5102
http://xstream1.somafm.com:5104
http://xstream1.somafm.com:6102
http://xstream1.somafm.com:6104
http://xstream1.somafm.com:6106
http://xstream1.somafm.com:6204
http://xstream1.somafm.com:6602
http://xstream1.somafm.com:6604
http://xstream1.somafm.com:8070
http://xstream1.somafm.com:8072
http://xstream1.somafm.com:8074
http://xstream1.somafm.com:8080
http://xstream1.somafm.com:8200
http://xstream1.somafm.com:8204
http://xstream1.somafm.com:8208
http://xstream1.somafm.com:8504
http://xstream1.somafm.com:8508
http://xstream1.somafm.com:8510
http://xstream1.somafm.com:8602
http://xstream1.somafm.com:8606
http://xstream1.somafm.com:8950
http://xstream1.somafm.com:9002
http://xstream1.somafm.com:9010
http://xstream1.somafm.com:9012
http://xstream1.somafm.com:9014
http://xstream1.somafm.com:9092
http://xstream1.somafm.com:9802
http://xstream1.somafm.com:9902
Comment 4 renan jegouzo 2015-12-15 08:34:48 UTC
I think there is another problem, if you instantiate AudioConverter multiple times.
AudioConverter.FillComplexBuffer raise the same exception for the second instance..
Comment 5 Sebastien Pouliot 2015-12-16 02:58:04 UTC
Some of the links above works now, e.g. http://ar.canstream.co.uk:8003/live.aac

but other like http://uwstream3.somafm.com:9010/

fails with an FormatNotSupported error:

> Invalid input format [SampleRate=32000 FormatID=MPEGLayer1 FormatFlags=0 
> BytesPerPacket=0 FramesPerPacket=384 BytesPerFrame=0 ChannelsPerFrame=2 
> BitsPerChannel=0]

That error comes directly from AudioConverterNewSpecific so the problem likely occurs before. FWIW some of the values seems incorrect.
Comment 6 renan jegouzo 2016-02-03 23:02:20 UTC
I fixed most of the problems, with a circularbuffer and 1s prebuffering , before starting the output queue
Comment 7 renan jegouzo 2016-02-03 23:03:49 UTC
and switching to 

Xamarin Studio
Version 6.0 (build 2572)
Installation UUID: 2a46676f-5eb8-4569-9aa7-630cd15bdfc2
Runtime:
	Mono 4.2.2 (explicit/996df3c)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402020030

Xamarin.Profiler
Version: 0.30.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Apple Developer Tools
Xcode 7.2 (9548)
Build 7C68

Xamarin.iOS
Version: 9.5.0.73 (Business Edition)
Hash: f5270a6
Branch: master
Build date: 2015-12-16 12:41:25-0500

Xamarin.Android
Version: 6.0.1.10 (Business Edition)
Android SDK: /Volumes/ssd/android-sdk-macosx
	Supported Android versions:
		4.2 (API level 17)
		5.1 (API level 22)
		6.0 (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

Xamarin Android Player
Not Installed

Xamarin.Mac
Version: 2.4.1.6 (Business Edition)

Build Information
Release ID: 600002572
Git revision: 0b29378607e40938dd37b5059d76dc67be6eed31
Build date: 2015-12-15 17:44:49-05
Xamarin addins: 1d76db671b3d14ae686f9dffb3faa4bcbdeca8b9
Build lane: monodevelop-lion-master

Operating System
Mac OS X 10.11.3
Darwin macbook.home 15.3.0 Darwin Kernel Version 15.3.0
    Thu Dec 10 18:40:58 PST 2015
    root:xnu-3248.30.4~1/RELEASE_X86_64 x86_64
Comment 8 Alex Soto [MSFT] 2016-05-05 04:26:58 UTC
Hello Renan, wanted to follow up on this, so can we close this bug report now? Hope everything is working now :)
Comment 9 renan jegouzo 2016-05-06 19:56:08 UTC
yes, this part was working, but I've switched to swift, xamarin not working all for me now.. crashes  in the core xamarin code...
Comment 10 Sebastien Pouliot 2016-05-11 14:14:35 UTC
Closing.

@Renan we would be thankful if you could share any crash report(s) or test case(s) for your other issues. Thanks and sorry for your issues.