iOS Audio (Brian Barnes)

Ryan wrote:

Also, the project contains both the default config and the iOS config
file; I would suggest that you put a copy of the iOS config file (as
SDL_config.h) into the iPhone XCode directory, and point directly at
that one.

This tends to cause problems if you run the configure script, and THEN
try to use a project file. Is this where you’re seeing issues?

Never ran any configuration scripts.

Basically, the iOS project has both SDL_config.h and SDL_config_iphoneos.h included. It should just have SDL_config.h (as far as I understand, as everything points to it) and that file should be a copy of SDL_config_iphoneos.h. Because of the naming of the includes, you need to copy it over and change it.

This really doesn’t have anything to do with the sound and is just a project setup issue that’s really not a big deal at all (I was just suggesting a clean up.)

What’s wrong with the audio is a much bigger concern to me.

[>] Brian

Basically, the iOS project has both SDL_config.h and
SDL_config_iphoneos.h included. It should just have SDL_config.h (as
far as I understand, as everything points to it) and that file should
be a copy of SDL_config_iphoneos.h. Because of the naming of the
includes, you need to copy it over and change it.

The default SDL_config.h will just #include SDL_config_iphoneos.h. You
don’t have to copy it over. I think there was a time in the past where
you had to, but you don’t have to now.

To confuse this further: this was broken in revision control until about
30 seconds ago, because someone accidentally committed the output from
the configure script. I just noticed it when replying to this email, and
fixed it.

–ryan.

It seems that could bite other people in the butt in the future. Why not have
configure generate a different file? Or why not move the defs in SDL_config.h to
a different file that then will be included by the SDL_config.h create by configure?

Best regards,
ChrisOn 11-08-30 05:16 PM, Ryan C. Gordon wrote:

To confuse this further: this was broken in revision control until about 30
seconds ago, because someone accidentally committed the output from the
configure script. I just noticed it when replying to this email, and fixed it.

I’ve been bitten by this multiple times myself (in the form of trying to build a non-configure platform from an SDL source tree that I had previously configured).On 08/30/2011 04:35 PM, Chris Eineke wrote:

On 11-08-30 05:16 PM, Ryan C. Gordon wrote:

To confuse this further: this was broken in revision control until about 30
seconds ago, because someone accidentally committed the output from the
configure script. I just noticed it when replying to this email, and fixed it.

It seems that could bite other people in the butt in the future. Why not have configure generate a different file? Or why not move the defs in SDL_config.h to a different file that then will be
included by the SDL_config.h create by configure?

Best regards,
Chris


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


LordHavoc
Author of DarkPlaces Quake1 engine - http://icculus.org/twilight/darkplaces
Co-designer of Nexuiz - http://alientrap.org/nexuiz
"War does not prove who is right, it proves who is left." - Unknown
"Any sufficiently advanced technology is indistinguishable from a rigged demo." - James Klass
"A game is a series of interesting choices." - Sid Meier

Hold on, I like not having to run configure when i build SDL from Xcode…
VittorioOn Wed, Aug 31, 2011 at 1:35 AM, Chris Eineke wrote:

On 11-08-30 05:16 PM, Ryan C. Gordon wrote:

To confuse this further: this was broken in revision control until about
30
seconds ago, because someone accidentally committed the output from the
configure script. I just noticed it when replying to this email, and fixed
it.

It seems that could bite other people in the butt in the future. Why not
have configure generate a different file? Or why not move the defs in
SDL_config.h to a different file that then will be included by the
SDL_config.h create by configure?

Best regards,
?Chris


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

It’s good to see you don’t have to run configure, and the archive was
just messed up.

Ryan, any fprintf/debugging or special versions you want to test for the
iOS audio, I’m game, just send me some email. I don’t use anything but
the regular audio callback (my own mixer, etc), so it’ll be a good low
level test.

[>] Brian

Ryan, any fprintf/debugging or special versions you want to test for the
iOS audio, I’m game, just send me some email. I don’t use anything but
the regular audio callback (my own mixer, etc), so it’ll be a good low
level test.

It works in the simulator for me; I’ll have to figure out how to get
this running on a real iOS device, though.

–ryan.

Ryan wrote:

Ryan, any fprintf/debugging or special versions you want to test for the
iOS audio, I’m game, just send me some email. I don’t use anything but
the regular audio callback (my own mixer, etc), so it’ll be a good low
level test.

It works in the simulator for me; I’ll have to figure out how to get
this running on a real iOS device, though.

Is this something you just put in the archive in the last day? It’s not
working for me. It gives that “setting to null device” error.

Is this potentially some bug I’ve created in my setup code? The sound
works find on OS X/windows (exact same code, but 1.2.) Is there a
difference in 1.3 that I’m missing?

[>] Brian

Is this potentially some bug I’ve created in my setup code? The sound
works find on OS X/windows (exact same code, but 1.2.) Is there a
difference in 1.3 that I’m missing?

I just compiled SDL/test/loopwave.c, and made sure SDL/test/sample.wav
got copied over to the simulator with the compiled program, and it worked.

If you can send me your code, I can take a look.

–ryan.

Ryan wrote:

I just compiled SDL/test/loopwave.c, and made sure SDL/test/sample.wav
got copied over to the simulator with the compiled program, and it worked.

If you can send me your code, I can take a look.

I don’t have to send the code, as it’s all open source. The problem is that there are additional libraries to compile, and you have to get a demo project, and all that takes a bit of time (time of yours I’d rather not waste!)

So, let’s see if I can solve this. Can you give me a little background on WHY you might see this error? This happens during a call to OpenAudio (and it hangs for about 10 seconds after this message, before returning.) This is SDL 1.3, latest.

2011-09-01 19:45:11.265 dim3iPadEngine[8045:b303] Error ‘!dat’ trying to set the (null) audio devices’ sample rate

[>] Brian

2011-09-01 19:45:11.265 dim3iPadEngine[8045:b303] Error ‘!dat’ trying
to set the (null) audio devices’ sample rate

This in in the simulator, right?

General consensus on Google is that this happens if you have some audio
hardware that won’t let you change sample rates (webcams are a common
culprit for this). Go look in system preferences and see what your
default input/output devices are under “Sound”.

After that, we’ll have to keep digging.

–ryan.

Ryan wrote:

2011-09-01 19:45:11.265 dim3iPadEngine[8045:b303] Error ‘!dat’ trying
to set the (null) audio devices’ sample rate

This in in the simulator, right?

General consensus on Google is that this happens if you have some audio
hardware that won’t let you change sample rates (webcams are a common
culprit for this). Go look in system preferences and see what your
default input/output devices are under “Sound”.

After that, we’ll have to keep digging.

Ryan, I sincerely apologize for wasting your time. What a bizarre bug. I thought the error was coming from you, but it’s actually coming from the OS, which was my confusion. I had a … you guessed it … webcam … set to input. It’d be nice if that could be trapped for (it’s input, not output), but I can see where that might be hard as that message is basically a console message.

[>] Brian

Ryan, I sincerely apologize for wasting your time. What a bizarre bug.

It’s cool, you didn’t waste my time. I’m glad we figured it out. :slight_smile:

–ryan.