Author Topic: BASS for iOS (iPhone/iPad)  (Read 446984 times)

Ian @ un4seen

  • Administrator
  • Posts: 20140
Re: BASS for iOS (iPhone/iPad)
« Reply #1175 on: 31 Mar '17 - 15:07 »
The iOS version of the BASSMIDI 2.4.11 release is now up in the 1st post.

draenorr

  • Posts: 2
Re: BASS for iOS (iPhone/iPad)
« Reply #1176 on: 3 Apr '17 - 09:24 »
Hello, I have a problem with bitRate
I'm trying to open online stream
http://radio.sosimc.ru:9000/838264aac
Code: [Select]
BASS_ChannelGetAttribute(chan, BASS_ATTRIB_BITRATE, &_bitRate)bass return me 4294967

This value returned for any AAC stream. Is this attribute unsupported for AAC or I'm made an error somewhere?
« Last Edit: 3 Apr '17 - 09:59 by draenorr »

Ian @ un4seen

  • Administrator
  • Posts: 20140
Re: BASS for iOS (iPhone/iPad)
« Reply #1177 on: 3 Apr '17 - 15:55 »
A BASS update to fix that problem is up now in the 1st post, so please re-download to get that.

draenorr

  • Posts: 2
Re: BASS for iOS (iPhone/iPad)
« Reply #1178 on: 4 Apr '17 - 08:59 »
Thank you very much!

Oleg N

  • Posts: 78
BASS_StreamCreateURL() for iTunes music delay
« Reply #1179 on: 7 Apr '17 - 11:57 »
Has anyone had this problem?
When starting a track on iOS device from iTunes library using "ipod-library://" URL it takes 2 to 7 seconds before playback actually starts.
- tracks are usually 320 kbps AAC, without DRM, synced from iTunes on mac.
- reproduces randomly on iPhone 5S, 6S, 7+, with iOS 10.3, built on XCode 8;
- no particular track on which this happens, problem seems to disappear after 3-4 tracks, but then suddenly sometimes appears again

Code: [Select]
    DWORD flags = BASS_SAMPLE_FLOAT | BASS_ASYNCFILE;
    _sourceChannel = BASS_StreamCreateURL(iPodURL.absoluteString.UTF8String, 0, flags, NULL, NULL);
« Last Edit: 7 Apr '17 - 16:50 by Oleg N »

Ian @ un4seen

  • Administrator
  • Posts: 20140
Re: BASS for iOS (iPhone/iPad)
« Reply #1180 on: 7 Apr '17 - 16:01 »
Is the delay in the stream creation or in starting playback, ie. in the BASS_StreamCreateURL or BASS_ChannelPlay call?

With "ipod-library://" URLs, iOS (rather than BASS) handles the file reading. I'm not entirely sure what iOS does internally with them, eg. what sort of overhead iPod library access has.

Oleg N

  • Posts: 78
Re: BASS for iOS (iPhone/iPad)
« Reply #1181 on: 4 May '17 - 09:47 »
Quote

Is the delay in the stream creation or in starting playback, ie. in the BASS_StreamCreateURL or BASS_ChannelPlay call?

With "ipod-library://" URLs, iOS (rather than BASS) handles the file reading. I'm not entirely sure what iOS does internally with them, eg. what sort of overhead iPod library access has.


Ian, I switched to using our own plugin for iPod-library URLs and problem is gone. My plugin uses AudioFile and ExtAudioFile as appropriate. Standart   BASS_StreamCreateURL seems to spend some time on locked background thread when executing BASS_StreamCreateURL(). That could be partially because once stream is created, I am often creating the second temporary stream with the same url, for analysis, and Apple documented these API as not thread - safe. So actually not BASS problem, but maybe the point for improvement.
« Last Edit: 4 May '17 - 09:50 by Oleg N »

Ian @ un4seen

  • Administrator
  • Posts: 20140
Re: BASS for iOS (iPhone/iPad)
« Reply #1182 on: 4 May '17 - 16:53 »
BASS uses AudioFile and ExtAudioFile too when dealing with "ipod-library://" URLs, but perhaps it's doing something different to what you did. I will send you a debug version to try to locate where the delay is coming from.

Oleg N

  • Posts: 78
Re: BASS for iOS (iPhone/iPad)
« Reply #1183 on: 9 May '17 - 17:10 »
Turns out, using up-to-date BASS lib build solved my problem with delay on ipod-library resources. Thank You, Ian!

StephBel

  • Posts: 7
Re: BASS for iOS (iPhone/iPad)
« Reply #1184 on: 17 May '17 - 10:51 »
Hello,
Apple now reject App that are listening to device lock notifications.
I can't spot with 3rd party library is making my App rejected  :(
Does BASS use com.apple.springboard.lockstate ?


Spotted, you are not the bad guy  ;D
« Last Edit: 17 May '17 - 11:00 by StephBel »

Oleg N

  • Posts: 78
Re: BASS for iOS (iPhone/iPad)
« Reply #1185 on: 18 May '17 - 13:10 »
Hello,
Apple now reject App that are listening to device lock notifications.

Wow... Did You have this string somewhere in the code (com.apple.springboard.lockstate)? Or can they detect the fact of app listening to Springboard even if it's not simply hardcoded in?
« Last Edit: 18 May '17 - 13:29 by Oleg N »

StephBel

  • Posts: 7
Re: BASS for iOS (iPhone/iPad)
« Reply #1186 on: 19 May '17 - 07:52 »
Yes, I made a grep and a 3rd party library was registering an observer on "com.apple.springboard.lockstate".
I think Apple is looking for the string because my App binary was rejected just after the submission.

Oleg N

  • Posts: 78
Re: BASS for iOS (iPhone/iPad)
« Reply #1187 on: 13 Jun '17 - 15:57 »
So, anyone had a chance to couple BASS with new Airplay2 AVSampleBufferAudioRenderer / AVSampleBufferRenderSynchronizer capability already? seems like an answer to 3-year Airplay dis-functionality for multiple devices support...

https://devstreaming-cdn.apple.com/videos/wwdc/2017/509v96e4gd96rlqyq/509/509_introducing_airplay_2.pdf
(from page 61)

Ge0rges

  • Guest
Re: BASS for iOS (iPhone/iPad)
« Reply #1188 on: 9 Jul '17 - 00:01 »
Hi, How can I get notified by BASS when my channel created with BASS_StreamCreateFile has finished playing the file?

Ian @ un4seen

  • Administrator
  • Posts: 20140
Re: BASS for iOS (iPhone/iPad)
« Reply #1189 on: 10 Jul '17 - 17:16 »
You can set a BASS_SYNC_END sync via BASS_ChannelSetSync to get notified when playback reaches the end, something like this:

Code: [Select]
BASS_ChannelSetSync(stream, BASS_SYNC_END, 0, EndSyncProc, NULL);
BASS_ChannelPlay(stream, 0);

...

void EndSyncProc(HSYNC handle, DWORD channel, DWORD data, void *user)
{
// do something here
}