Creating system sounds
I have 4 view controller classes and I need to have all my sound effects accessible to each view controller, does anyone know how to do that.
Use global variables! Make a globals.h file:
Make a globals.c file:
Include globals.h in whatever needs access to those sounds.
There are, of course, many different ways to use globals. They could be maintained in your sound engine just as well, but this is a trivial problem to solve with globals.
Code:
extern int mySoundID;Make a globals.c file:
Code:
int mySoundID;Include globals.h in whatever needs access to those sounds.
There are, of course, many different ways to use globals. They could be maintained in your sound engine just as well, but this is a trivial problem to solve with globals.
Did you mean a global.m file? Is there any sample code that you could point me to?
Sure you can name it .m too, it doesn't matter. The code I posted above *was* the sample code
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Releasing System sounds | MacSteve85 | 3 | 2,243 |
Jan 30, 2010 06:15 PM Last Post: MacSteve85 |
|

