Considering the code:
soundFilePath = [[NSBundle mainBundle] pathForResource: @"Sound" ofType: @"wav"];
fileURL = [[NSURL alloc] initFileURLWithPath: soundFilePath];
avPlayerNextLevel = [[AVAudioPlayer alloc] initWithContentsOfURL: fileURL error: nil];
avPlayerNextLevel1.volume = volume ...
|
I'm using AVAudioPlayer to play sound effects in an iPhone game.
This is part of my code:
AVAudioPlayer *player = [dict objectForKey:@"Player"];
if (player.playing) {
player.currentTime = 0;
} else {
...
|
I am trying to use this class as
AVAudioPlayer *newPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL: fileURL
error: ... |
With the AVAudioPlayer, can I stream live audio from my microphone?
If so, how would I do this?
|
I have been using a class to play sounds using AVAudioPlayer. Since I want to release these sounds right after they are played, I added a delegate. That causes ... |
I'm rather surprised at how few objects implement NSCopying. This is the third time in two weeks where I have needed to duplicate an existing object, without having to either ... |
It appears that AVAudioPlayer is not reentent. So in the following would soundfx play to completion, delay 1 second, then play again, rather then the 1 second delay - and ... |
|
@implementation MyClass
-(id) init
{
NSString *path0 = [ [NSBundle mainBundle] pathForResource:@"myfile" ofType:@"m4a" ];
mSound = [[AVAudioPlayer alloc]initWithContentsOfURL:[NSURL fileURLWithPath:path0] error:NULL];
mSound.delegate = self; ...
|
After searching around for how to send AVAudioPlayer output to the iPhone's speaker, I found this:
http://stackoverflow.com/questions/1064846/iphone-audio-playback-force-through-internal-speaker
Despite setting the category correctly to AVAudioSessionCategoryPlayAndRecord, this solution doesn't seem to be working for ... |
I am using multiple instances of AVAudioPlayer to play multiple audio files simultaneously. I run a loop to start playing the audio files (prepareToPlay is called beforehand and the loop only ... |
I am using the AVAudioPlayer class to play .mp3 files in my App. Is it possible to check whether the earphones are connected to the device programmatically?
In first generation iPod devices, ... |
When does the AVAudioPlayer's currentTime method return a negative value? The audio file is playing (I am putting in a check before getting currentTime) but making a call to currentTime returns ... |
Hey guys!
I need to build a visual graph that represents voice levels (dB) in a recorded file. I tried to do it this way:
NSError *error = nil;
AVAudioPlayer *meterPlayer = [[AVAudioPlayer alloc] ... |
I am developing an iphone application using "AVAudioPlayer" for playing a ".wav" file . For this i am adding header file "#import <AVFoundation/AVAudioPlayer.h>" . But while ...
|
I am creating an audio player application, i need to enable the user to fast forward and backward a song by holding a button(seperately for each). I've done for playing, stopping, ... |
I am using AVAudioplayer to play some audio files. I have some controls like forward and rewind.
Rewind is working properly but forward is not.
- (void)rewind
{
AVAudioPlayer *player = ...
|
I am using AVAudioPlayer to play some ima4 files. The initialization of the player keeps failing with error code 1685348671 (dta) which according to the documentation means
The file is ... |
Cannot find executable for CFBundle/CFPlugIn 0x432bfa0 </Library/Audio/Plug-Ins/HAL/DVCPROHDAudio.plugin> (not loaded)
Cannot find function pointer NewPlugIn for factory C5A4CE5B-0BB8-11D8-9D75-0003939615B6 in CFBundle/CFPlugIn 0x432bfa0 </Library/Audio/Plug-Ins/HAL/DVCPROHDAudio.plugin> (not loaded)
That's the error I get when I try to run ... |
I'm having trouble playing some files with AVAudioPlayer. When I try to play a certain m4a, it works fine. It also works with an mp3 that I try. However it fails ... |
I got the following code:
- (id)init {
if (self = [super init]) {
UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback;
...
|
We are a developing an application which is supposed to play long audio files. duration of audio file can be upto 23 hours...
we are trying to use this AVAuidoPlayer for this ... |
I have using AVAudioPlayer in my app but the problem is that when i play the song from list it will played while before stopping the song i am again goes ... |
Actually i am using avaudioplayer.
my player is working very fine (forward,revind,play,pause,volume,progress bar).
Only problem is that i am not able to stop the song.
so all songs are overlapped please any body tell ... |
I'm using this code to play a different mp3 files with every call. The first time through works great. The second time crash, as indicated below.
.h
AVAudioPlayer *player;
@property (nonatomic, retain) AVAudioPlayer *player;
.m
-(void)load:(NSURL ...
|
I am writing an app that downloads a wav file from a server and needs to play that file. The files use the mulaw codec with 2:1 compression. These ... |
I am trying to use AVAudioPlayer to play some sounds in quick succession. When I invoke the sound-playing function less frequently so that the sounds play fully before the function is ... |
I have an audio app using AVAudioPlayer build for iPhone 3.x, now I would like to harness the multi-tasking capability in iOS 4 such that it can play music at the ... |
I'm experiencing an odd problem with AVAudioPlayer class.
Everytime I try to access one of it's properties they are null.
// Get the file path to the song to play.
NSString *filePath = ...
|
im new developer and making my firt iPhone app ,and i want to make button to on/off multiplesounds , example when i press button for multiple sounds after when i ... |
Does anybody know if it is possible to handle interruption by AVPLayer delegate when I have more then one AVPlayer?
I have tried few things to start again two AVPlayer after phone ... |
Can someone please point me in the right direction... I need to use the same sound (a button press) throughout all view controllers in my app. What is the best way ... |
I want to develop an application for the iPhone that generates custom DTMF tones. I assume the pure tone will be played from a memory buffer and not from an uploaded ... |
Now I m using the class AVAudioPlayer .
But still i m not getting right value in decibel.
there is any way to get the value in decibel range 0.0 to 120.0 (not ... |
I am developing an application that involves clicking a button repeatedly, and I am giving an audio feedback for this click, a click wave file.
it works fine, but I have a ... |
i have created a music application in which there are 90 songs.when i click on a particular song it plays. i need that when i click on a particular song ... |
I have a simple mp3 playing through AVAudioPlayer and I want to be able to display how much time is left.
I know the answer includes subtracting AVAudioPlayer.duration from AVAudioPlayer.currentTime but ... |
I seem to have a bug because I'm using -[AVAudioSession setActive:withFlags:error:] in an iPhone project that is for 3.0 - 4.0.2. So I guess I need to put one of those ... |
I'd like to control an instance of AVAudioPlayer from a UITableView item in a didSelectRowAtIndexPath instance.
First touch of the row item triggers 'play' of the AVAudioPlayer. Second touch of the ... |
In my application i am having 25 images, each image has corresponding music. I am playing the music when clicking on the image using avaudioplayer. But when i am clicking on ... |
I need to play sounds (~5 seconds each) throughout my iphone application. When they're triggered, they need to play immediately.
For the moment I'm using AudioServices and (as you probably know) the ... |
I want to play multiple audio files (.WAV) using IBAction and AVAudioPlayer. Unfortunatelly the sound plays but if I play the sound many times, my application crashes. Can you help me?
Here's ... |
Using MPMediaQuery and then getting the MPMediaitemPropertyAssetURL from the song results sometimes returns null (and by sometimes I mean in this case, 1/3 of the users song library).
Does anyone know what ... |
Is it possible to pick media items using MPMediaPickerController and then load them into an AVAudioPlayer object?
|
i want know what song is currently played by the avaudioplayer
|
I sub-classed AVAudioPlayer like so:
#import <AVFoundation/AVFoundation.h>
@interface AudioPlayer : AVAudioPlayer {
// irrelevant objects...
}
-(void) myMethod;
@end
I also placed myMethod in the implementation. In another class, I instantiate the sub-class ... |
I'm writing an app that plays some simple voices and sounds using AVAudioPlayer. However, in order to really make the app "killer", it would need to access the users' own voice ... |
I created instance AVAudioPlayer but the instance is working only once like if I give
if(a.playing)
{
i=1
}
else
{
i=2
}
for 1st time its giving ... |
Audio Player works fine if I initiate it for 20 to 30 times but after that it shows the following error
Error Domain=NSOSStatusErrorDomain Code=-43 "The operation couldn’t be completed. (OSStatus error -43.)" ... |
I play sound making this:
NSData *data = [NSData dataWithBytesNoCopy:buffer length:length freeWhenDone:NO];
AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithData:data error:nil];
In this buffer i have sound with aac format.
Everything is ok, until I want to ... |
I have audio constantly playing during my application. I am having some odd behavior when I press the button to return to Springboard then resume my applications. The Audio ... |
For my small game, I'd like to play effect sound for various scenario.
Mostly it will be user-interaction related.
I may need to play multiple sounds at one time.
I'm ... |
I'm implementing a simple button-sound interface for a toy project. There are multiple buttons, with individual sounds assigned to each button. I accomplish this all within the fooViewController.{h,m} with ... |
I'm programming an application for the hearing-impaired. I'm hoping to take tracks from the iTunes library, and in my app have a slider for panning. I don't want to use OpenAL ... |
I am developing an AlarmClock app, and having problem in selecting sounds, I have multiple sounds in different rows as usual as in alarm apps. I want to play the sound ... |
I've got valuechanged event handler like that:
-(void)scrub:(id)sender
{
if(self.audioPlayer.playing)
{
self.audioPlayer.pause;
self.audioPlayer.currentTime=self.scrubber.value;
...
|
I've got a problem and don't know how to handle it. Tyring to build an app with sound and animation. It gives me a level 1 and then level 2 memory ... |
I am trying to use the AVAudioPlayer to play a simple sound and I keep getting this error in the console:
2011-09-02 20:29:07.369 MusicLog[967:10103] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not ... |
I'm making my own audio player using AVAudioPlayer.
NOTE: "p" is my instance of the player
Here's how I'm reading the track progress in one of the labels:
currentTime.text = [NSString stringWithFormat:@"%d:%02d", (int)p.currentTime / ...
|
I'm using AVAudioPlayer to play a short one or two syllables word in my app. Currently there are 250 .aiff files and each of the file is roughly 88KB to ... |
When I start my app on iphone at that time my AVAudioPlayer gets closed. and I want that when I start my app in background AVAudioplayer should be on and when ... |
I am trying to pause the AVAudioPlayer if it is currently playing. When I debug my code and check AVAudioPlayer, I see it is allocated. When I try to ... |
In the phone below I am readying an AVAudioPlayer for four different sounds in my app. If I do not do this, it causes the app to delay about 1.5 seconds ... |