Iphone Sound Format

Previous topic - Next topic

MrTAToad

The file you are trying to access is temporarily unavailable...

PaLe

Quote from: PaLe on 2010-Oct-06
A new problem!!! (apologize for English)

I hope that it's a (my) simple code error in the variable/declarations error.... :blink:

OK, now I explain.... This is my example link:

http://www.megaupload.com/?d=5LRCV7CG

Sorry for the code; the level of programming like's ZX basic  ;) ... I only copied/pasted the load/play routines from the original code in a new project.

Please, First load the snd.glb project and run it with (F5 key or fn+F5 on Mac)... probably run well and you can hear the tunes (a loop of 3+1 different tracks)

after, try to compile a Windows EXE and run the executable.... the program ends... maybe it's a mouse click problem???  ::)

anyway, when I compiled for iPhone, the example start but whitout sound and, STRANGELY, the screen doesn't change (follow) the sound loop...
I mean it's a variable problem or what??? ( O_O and why??)

sorry if you spent time for any My mistake of programming...  :nw:

Paolo

attached here...

[attachment deleted by admin]

PaLe

sorry, I wrongly quote striketrough instead underline... I suggest First to Run the snd.glb in the IDE and then to test on windows/iphone.

MrTAToad

#18
The windows program seems to work perfectly - the only time it exits straight away is if you hold down the mouse button whilst compiling and then running (but that can easily be dealt with by checking MOUSESTATE at the start).

Code (glbasic) Select
SETCURRENTDIR("Media")
percorso$=""

Also works fine.

On the iPhone, is the media actually present on the device ?  You may need to copy it manually.

PaLe


Yes, The Media directory contain all wav files. I checked it with an explorer file from Mac and also from iphone (iFile).

Do you tried it on iphone/ipod ?

MrTAToad

Unfortunately no, dont have an iPod

ampos

I created .mp4 sound files in Nero Wave Editor and they work.

PaLe

( for anyone that have an ipod/iphone and 10 minutes of freetime )

A M P O S, me a favour...

can you test the Xcode of SndTest.zip (of my previous link)  or, better, compile the snd.glb also included on your ipod/iphone? I hear the sound in window executable but nothing on iPhone and I didn't understand yet why!

http://www.glbasic.com/forum/index.php?action=dlattach;topic=5159.0;attach=2432

ampos

Until tonite I could not test, my mac is at home.

ampos

It is driving me crazy.

First: the WAVs files are fine. I copied "B.wav" to /media on my current project, loaded and play, and it works.

The strange is that in your program, something is going bad: it should show "playing track n", play for a few seconds, next line, and so.

But in iPhone it just shows 4 times "playing track 1"

Something weird, but you has something.

Just try a step by step approach:

Code (glbasic) Select

SETCURRENTDIR("Media") // seperate media and binaries?
LOADSOUND "B.wav",1,3
ch=PLAYSOUND(1,0,1)
repeat
   print "test",10,10
   showscreen
until n=1


this simple code does work on your wav files

Leginus

Got my developers license through today  :good:.
So I thought i would try and help with some testing.
I have put my game on iphone using wav files created using Audacity and everything works perfect.

I then change some of the sounds to .ogg using Audacity and changed the filenames accordingly (using case sensitive and then none case sensitive), these sounds didnt play on any occasion, yet the wavs were still playing fine.

I tried playing the oggs using playmusic and these didnt play either.
I suspected it could be Audacity that was the problem, so I downloaded an ogg NOT created with audacity and again no sound whatsoever.

Therefore, wavs are fine on pc and iphone, but oggs I cannot get to play on either with the same code.
Is this an issue with GLBasic at the moment, or is this an IOS4.1 thing??

ampos

Instead ogg use .mp4 or .m4r. Check my post in bug forum.

Leginus

ah ok sorry didnt see that.  Nothing like repeating stuff to fill up a forum  :-[

trucidare

ok now from scratch.... the devices could only play the formats for which are codecs available.

iphone -> Audio: drm aac,caf,aif,wav   -> Video: m4v, mov


MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

ampos

iPhone can also play music in mp4 and m4r format.