When using ChannelSync for reading Meta tags, my app crash on the iPhone device but works just fine in the simulator.
I set sync like this:
mySync = new SYNCPROC(MetaSync);
Bass.BASS_ChannelSetSync(_stream, BASSSync.BASS_SYNC_META, 0, mySync, IntPtr.Zero);
and get meta data like this:
private void MetaSync(int handle, int channel, int data, IntPtr user)
{
TAG_INFO tags = new TAG_INFO();
if (tags.UpdateFromMETA(Bass.BASS_ChannelGetTags(_stream, BASSTag.BASS_TAG_META), false, true))
{
_NetStreamEventArgs.Artist = tags.artist;
_NetStreamEventArgs.Title = tags.title;
}
}
The app crash on "Bass.BASS_ChannelSetSync", here is the debug info I get from Monotouch
Unhandled Exception: System.ExecutionEngineException: Attempting to JIT compile method '(wrapper native-to-managed) CasterPlay.AudioEngine:MetaSync (int,int,int,intptr)' while running with --aot-only.
at (wrapper managed-to-native) Un4seen.Bass.Bass:BASS_ChannelSetSync (int,Un4seen.Bass.BASSSync,long,Un4seen.Bass.SYNCPROC,intptr)
I can read tags "manually" like this (but then I need a timer to pull the data..
TAG_INFO _tagInfo = new TAG_INFO(URL);
if (BassTags.BASS_TAG_GetFromURL(_stream, _tagInfo))
{
_NetStreamEventArgs.Artist = _tagInfo.artist;
_NetStreamEventArgs.Title = _tagInfo.title;
}
Is is Bass, Bass.Net or me...?
/Ken