//

achtergrondmuziek

achtergrondmuziek discussie in Ontwikkelen voor iOS forum; ( verdwijnt na registratie ) Edit: Opgelost, met de volgende code : Code: AVAudioPlayer *myExampleSound; //this variable can be named differently NSString *myExamplePath = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"m4a"]; // *Music ...



Ga terug   iPhone, iPod touch, iPad en Apple TV forum > Development > Ontwikkelen voor iOS
Wachtwoord vergeten? Registreren!
Registreer FAQ Ledenlijst Kalender Zoeken Berichten van vandaag Markeer forums als gelezen
  #1  
Oud 09-05-09, 23:54
Tim14ww Tim14ww is offline
• iOS 6.0
• 6.0
• Besturingssysteem: Mac OS X
 
Geregistreerd: Jan 2009
Berichten: 155
Standaard achtergrondmuziek

Edit: Opgelost, met de volgende code :

Code:
AVAudioPlayer *myExampleSound;  //this variable can be named differently
    
    NSString *myExamplePath = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"m4a"]; // *Music filename* is the name of the file that you want to play.  BE SURE that you type the correct characters as the system is case-sensitive.  It caused a crash for me...  Very painful.
    
    myExampleSound =[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:myExamplePath] error:nil];
    
    myExampleSound.delegate = self;
    
    [myExampleSound prepareToPlay];
 
    [myExampleSound play];
    //[myExampleSound stop];
        
    myExampleSound.numberOfLoops = 10; /* can be as many times as needed by the application   -    myExampleSound.numberOfLoops = -1; >> this will allow the file to play an infinite number of times  */
Letwel, gebruik een m4a file.

Lock plz.

Greetz

Laatst gewijzigd door Tim14ww; 12-05-09 om 19:27. Reden: Opgelost
Advertentie
Advertentie Gesponsorde links (verdwijnt na registratie)

Reageren



Er zijn 1 actieve gebruikers die momenteel deze discussie bekijken (0 leden en 1 gasten)

 
Discussietools
Weergave

Soortgelijke discussies

Discussie Auteur Forum Reacties Laatste bericht
app waarmee je kan opnemen en tegelijkertijd ook instrumentale) achtergrondmuziek kan bilal2307 iPhone Apps 0 17-08-09 18:42

Regels voor berichten
Je mag geen nieuwe discussies starten
Je mag niet reageren op berichten
Je mag geen bijlagen versturen
Je mag niet je berichten bewerken

BB code is Aan
Smileys zijn Aan
[IMG]-code is Aan
HTML-code is Uit
Trackbacks are Aan
Pingbacks are Aan
Refbacks are Uit



Alle tijden zijn GMT +2. Het is nu 15:31.