12 * GNU General Public License for more details. |
12 * GNU General Public License for more details. |
13 * |
13 * |
14 * You should have received a copy of the GNU General Public License |
14 * You should have received a copy of the GNU General Public License |
15 * along with this program; if not, write to the Free Software |
15 * along with this program; if not, write to the Free Software |
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
17 * |
|
18 * File created on 23/09/2012. |
|
19 */ |
17 */ |
20 |
18 |
21 |
19 |
22 #import "AudioManagerController.h" |
20 #import "AudioManagerController.h" |
23 #import "AVFoundation/AVAudioPlayer.h" |
21 #import "AVFoundation/AVAudioPlayer.h" |
24 #import <AudioToolbox/AudioToolbox.h> |
22 #import <AudioToolbox/AudioToolbox.h> |
25 #import "MXAudioPlayerFadeOperation.h" |
23 #import "MXAudioPlayerFadeOperation.h" |
|
24 |
26 |
25 |
27 static AVAudioPlayer *backgroundMusic = nil; |
26 static AVAudioPlayer *backgroundMusic = nil; |
28 static SystemSoundID clickSound = -1; |
27 static SystemSoundID clickSound = -1; |
29 static SystemSoundID backSound = -1; |
28 static SystemSoundID backSound = -1; |
30 static SystemSoundID selSound = -1; |
29 static SystemSoundID selSound = -1; |
31 |
30 |
32 static NSOperationQueue *audioFaderQueue = nil; |
31 static NSOperationQueue *audioFaderQueue = nil; |
33 static MXAudioPlayerFadeOperation *fadeIn = nil; |
32 static MXAudioPlayerFadeOperation *fadeIn = nil; |
34 static MXAudioPlayerFadeOperation *fadeOut = nil; |
33 static MXAudioPlayerFadeOperation *fadeOut = nil; |
35 |
|
36 |
34 |
37 @implementation AudioManagerController |
35 @implementation AudioManagerController |
38 |
36 |
39 #pragma mark - |
37 #pragma mark - |
40 #pragma mark background music control |
38 #pragma mark background music control |