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

Ian @ un4seen

  • Administrator
  • Posts: 20496
Re: BASS for iOS (iPhone/iPad)
« Reply #1225 on: 12 Jan '18 - 16:42 »
You can indeed change the device output rate via "setPreferredSampleRate", and BASS will pick that up and change its output accordingly (you can check the BASS_INFO "freq" value to confirm). You could change the mixer's rate to match via its BASS_ATTRIB_FREQ setting, but that will result in any already buffered data (in the mixer's playback buffer) being played at an incorrect rate, and will also bit a bit fiddly regarding source rates. So it would probably be best to recreate the mixer with the new rate (if you want to avoid resampling). You could also disable buffering via the mixer's BASS_ATTRIB_BUFFER setting a bit prior to changing the rate, so that there is no buffered data at the time of the rate change, and you can immediately stop the old mixer and start the new one.

puzzler

  • Posts: 10
Re: BASS for iOS (iPhone/iPad)
« Reply #1226 on: 17 Jan '18 - 17:48 »
Latest iOS bass version. Latest iOS version on iPhone 7.
1. run app and play some music/sounds
2. call to this phone
3. after call completed and focus returned to app - no any music/sounds at all

How to fix it? Or possible to fix it?

Ian @ un4seen

  • Administrator
  • Posts: 20496
Re: BASS for iOS (iPhone/iPad)
« Reply #1227 on: 18 Jan '18 - 17:40 »
Do you see any messages in the console when the problem happens? Are you requesting interruption notifications (eg. AVAudioSessionInterruptionNotification), and if so, do you get notified when the interruption begins and ends? If you aren't using your own interruption notifications, please try using the BASS_CONFIG_IOS_NOTIFY option and see if you receive notifications then, something like this:

Code: [Select]
BASS_SetConfigPtr(BASS_CONFIG_IOS_NOTIFY, IOSNotifyProc);

...

void IOSNotifyProc(DWORD status)
{
NSLog(@"IOSNotifyProc(%d)", status);
}

Also confirm whether you are using either of the BASS_CONFIG_IOS_MIXAUDIO or BASS_CONFIG_IOS_NOCATEGORY config options.

puzzler

  • Posts: 10
Re: BASS for iOS (iPhone/iPad)
« Reply #1228 on: 18 Jan '18 - 19:23 »
I use BASS_SetConfig(BASS_CONFIG_IOS_MIXAUDIO, 5), don't use any interruption notifications, don't use flag BASS_CONFIG_IOS_NOCATEGORY

After app gets focus I get error at console "AUIClient_StartIO failed (561015905)
test with notify returns "IOSNotifyProc(2)"