Added: 2 years ago
From: PixelCUBEstudios
Views: 8,558
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (37)

Sign In or Sign Up now to post a comment!
  • hey, guys!shoutout to all the aspiring mobile apps developers out there. i've got some good news i'd like to share with you all. bitzio is currently on the lookout for talented mobile apps developer to join their team. subscribe to my channel and to learn more about bitzio and what it does. your comments and feedbacks will be appreciated too!

  • @FiLiP7011 retype that line and replace null with nil, that worked for me

  • Random question, but how do you get that cursor ripple effect whenever you click on something?

  • Do you have iPhone app idea? You can make your own iPhone app with a software called AppWizard in less than 30 minutes

  • how do you stop ALL audios when you go to a different screen??? when i add a new button:

    -(ibaction)stop;

    { [theaudio stop];

    }

    it then comes up saying "theaudio undelared"???

  • Hey great vids! Just one question: how do I specify it to start at a certain time?

  • How do I get it to play at the start of the game without a button

  • @James161997 under the -(void)viewDidLoad statement in the implementation file. Make sure to uncomment it, and PM me if you got it fixed.

  • how do i get the buttons to play once when pressed?so when i press button 1,than press button 2 and not have the sound from button 1 over lap button 2.

  • @johnydee187 Try making a variable for each sound and setting it to 1 when playing and 0 when stopped. That way, when another sound is starting, you can do an "if" statement to check if another sound is currently playing. If it is, you can either stop it or wait for it to stop. PM me if you need a bit more explanation, haven't tested this with Xcode yet.

  • @AttackoftheLuls hey thanks but iam a litte new to all this and dont quite understand,is that something i put in the code?and if yes where?

  • Put this in the viewdidload, however wne i exit a tab into another view the music carries on. is there a way to terminate it>?

  • Comment removed

  • @FiLiP7011 What that means is you copy and pasted some of the code from a comment on youtube. You need to type the code out yourself, and it should work.

  • I also have 3.0 and i accidently copied the avfoundation and im getting an error. How do i get it out of my project?

  • to put two audio files on at the same time, to make a new button you go to interface builder put a button on there then what?

  • this just make the iphone simulator crash. when i click the button

  • @windowsandapple then u might have to hook up the view to the view in IB

  • hey dude i can get my music to start with one button but i cant get it to stop. like if i press the playmusic button it'll play but when i press the stopmusic button nothing happens. and the more times i press the play button the more times it starts playing my song so i end up having my song play everytime i hit play and never stops and eventually ill have like 20 overlays of my song. i would appreciate it if u can get a chance to help me with this problem. thank you

  • do you know how to make one button that starts and stops the sound when pressed again?

    Thanks

    Mark

  • We would love to know which of these new features are finally included so developers can start takinng advantage of their presence in all the ingenious ways that they have done in the past. At EDUmobile. ORG - our iPhone Learning Course, that has over 100 students currently undergoing iPhone Development training, would try and incorporate as many of these new features as possible.

  • check your sources before you talk!!!!!!! EDUmobile is the gayest sdk site ever!!! theres not even forums or video tutorials. or you could go with fonebot, youtube and devforums and get 100x more all of that for free!!! GET A LIFE YOU FAT ASS and stop spamming to try and advertise your own company

  • so you dont have to type it in...

    - (IBAction) playsound {

    NSString *path = [[NSBundle mainBundle] pathForResource:@"imsound" ofType:@"wav"];

    AVAudioPlayer* myAudio=[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL];

    myAudio.delegate = self;

    myAudio.volume = 2.0;

    myAudio.numberOfLoops = 9;

    [myAudio play];

  • You do have to type it. You just put all that code on a button. You can also put the code into ViewDidLoad.

  • ok i did everything i was supposed to and i get build suceeded and everything works but no sound. ive done like 10 play sound tutorials and none work! any idea what might be wrong?

  • You mentioned mp3's play screwy?  Wav only allow 5secs, does the mp3's only play screwy in the simulator or in the device also?

    I am asking because I have built a soundboard and the mp3 only works for some of them in the simulator and I cant test in the device yet.

    Thanks

  • Just don't use mp3 in general. It sometimes causes the playback to skip/lag when dealing with loops and some other things. For the wav or mp3, there is no limit if you use the way I show you in the video. They can be as long as you want. You can use mp3 for long clips so it's not so noticeable (small skips in sound). Hope this helps!

  • @PixelCUBEstudios THANK YOU so much for this! I was using .mp3 and my game kept lagging. it was SO annoying, but now it works!

  • wow, this is really cool.

    It works perfekt.

    Is it possible to random 5 or 6 songs?

    Keep up the cool vids :-).

  • You can probably add a random code and use if statements, but Im not sure of how to do random numbers right now. If I find a way, I will let you know. Sorry about that!

  • i keep getting a problem

    it will show the button and everything in the simulator but then once i play it just like freezes it shows the button as if it had been clicked on but it doesnt go back to white.

    and yes i did make it touch up inside ad i checked the title of my song to make sure it was right

  • Are you getting any errors? Did you add the AVFoundation.framework to your project? Also, when you add the AVFoundation.framework, that pop-up asks if you want to add to project folder, and you should UNCHECK the square. If you check the square, it causes problems sometimes.

  • i did everything right it boots up in the simulator but it gives me a warning and says"WArning: passing argument 2 of 'pathForResource:ofType:' from incompatible pointer type"

  • Double check that line of code with mine in the video, you might have messed up on the Capitalization (upper/lower case). See if that helps.

  • hey does this mean i can play sounds simultaneously

  • yes you can play sounds simultaneously, so you can have background music, and you can have other sound effects that play at the same time.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more