Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Game Development

Reply
 
LinkBack Thread Tools Display Modes
Old 07-27-2010, 12:30 PM   #1 (permalink)
Registered Member
 
Join Date: May 2010
Location: Portugal
Posts: 18
^DJ_Link^ is on a distinguished road
Default is it possible to put libogg and libvorbis on IPhone?

Hello.
I'm trying to add sound support to my engine.
Till now I've managed to open and play Wav files using OpenAL.
I've read a tutorial on how to play OGG files with openAL, basically by using libogg and libvorbis

Mainly this one: DevMaster.net - OpenAL Lesson 8: OggVorbis Streaming Using The Source Queue

The problem is that when building the framework and adding it to my project the game crashes right after start, only boots if I remove the framework.
Is there any special way to compile frameworks for IPhone?
^DJ_Link^ is offline   Reply With Quote
Old 07-27-2010, 01:25 PM   #2 (permalink)
Registered Member
 
Join Date: Nov 2008
Posts: 234
warmi is on a distinguished road
Default

Quote:
Originally Posted by ^DJ_Link^ View Post
Hello.
I'm trying to add sound support to my engine.
Till now I've managed to open and play Wav files using OpenAL.
I've read a tutorial on how to play OGG files with openAL, basically by using libogg and libvorbis

Mainly this one: DevMaster.net - OpenAL Lesson 8: OggVorbis Streaming Using The Source Queue

The problem is that when building the framework and adding it to my project the game crashes right after start, only boots if I remove the framework.
Is there any special way to compile frameworks for IPhone?

Check this out:
https://devforums.apple.com/message/222072#222072
warmi is offline   Reply With Quote
Old 07-27-2010, 06:18 PM   #3 (permalink)
Registered Member
 
Join Date: May 2010
Location: Portugal
Posts: 18
^DJ_Link^ is on a distinguished road
Default

Quote:
Originally Posted by warmi View Post
Thanks. But actually I even thought someone manage to do solve the error I'm getting they don't explain how. Still trying to compile a framework to IPhone.
I asked there, let's hope someone answers.
^DJ_Link^ is offline   Reply With Quote
Old 07-29-2010, 08:26 AM   #4 (permalink)
Registered Member
 
Join Date: Sep 2008
Location: Spain
Posts: 176
lefty is on a distinguished road
Default

I got the tremor branch to compile without the _ARM_ASSEM_ define and it works (although extreemly slow).
If you define _ARM_ASSEM_ you will get a load of errors because they used asm instead of __asm__. If you fix that it still won't compile floor0.c. No reason given, just "compiler failed with exit code 1" - very useful that. Didn't get any further than that.
lefty is offline   Reply With Quote
Old 07-29-2010, 08:32 AM   #5 (permalink)
Registered Member
 
Join Date: May 2010
Location: Portugal
Posts: 18
^DJ_Link^ is on a distinguished road
Default

Quote:
Originally Posted by lefty View Post
I got the tremor branch to compile without the _ARM_ASSEM_ define and it works (although extreemly slow).
If you define _ARM_ASSEM_ you will get a load of errors because they used asm instead of __asm__. If you fix that it still won't compile floor0.c. No reason given, just "compiler failed with exit code 1" - very useful that. Didn't get any further than that.
I was able to build the tremor low mem branch successfully and it's working. I was able to play a 1.1 MB Ogg file till the end. I'm still loading all to the memory though, must do it streamable. Also only tested on the emulator, didn't had the chance to try with a real device.

What I did: dragged all .h and .c files to my project. DONT PUT THIS FILE ivorbisfile_example.c. After that all worked.
^DJ_Link^ is offline   Reply With Quote
Old 08-01-2010, 10:18 AM   #6 (permalink)
Registered Member
 
Join Date: Sep 2008
Location: Spain
Posts: 176
lefty is on a distinguished road
Default

Finally got it working, but I'm not sure how. I was mucking around with the compiler settings and switched to LLVM_GCC4.2 and deselected the thumb option and it started compiling then (even though that makes no sense :shrug
As it happens the assembler only speeds it up a small bit.
A sound that loads in 70ms as WAV, will load in 206ms as OGG and 194ms as OGG with assembler enabled.
lefty is offline   Reply With Quote
Old 09-20-2011, 07:38 PM   #7 (permalink)
Registered Member
 
Join Date: Sep 2011
Posts: 4
marktronic is on a distinguished road
Default

Quote:
Originally Posted by lefty View Post
Finally got it working, but I'm not sure how. I was mucking around with the compiler settings and switched to LLVM_GCC4.2 and deselected the thumb option and it started compiling then (even though that makes no sense :shrug
As it happens the assembler only speeds it up a small bit.
A sound that loads in 70ms as WAV, will load in 206ms as OGG and 194ms as OGG with assembler enabled.
I am trying to get libogg and libvorbis compiled for iOS as well and having absolutely no luck. I've tried using the build_for_iphoneos script found here:

http://pseudogreen.org/bzr/sandbox/i...d_for_iphoneos

but have had no luck. :/ Mind sharing how you did it?
marktronic is offline   Reply With Quote
Old 09-21-2011, 05:11 PM   #8 (permalink)
Registered Member
 
Join Date: Sep 2008
Location: Spain
Posts: 176
lefty is on a distinguished road
Default

Quote:
Originally Posted by marktronic View Post
I am trying to get libogg and libvorbis compiled for iOS as well and having absolutely no luck. I've tried using the build_for_iphoneos script found here:

http://pseudogreen.org/bzr/sandbox/i...d_for_iphoneos

but have had no luck. :/ Mind sharing how you did it?
What version of the library are you using? I managed to get tremor working, but not tremolo. What errors do you get?
lefty is offline   Reply With Quote
Old 09-22-2011, 01:51 AM   #9 (permalink)
Registered Member
 
Join Date: Sep 2011
Posts: 4
marktronic is on a distinguished road
Default

Quote:
Originally Posted by lefty View Post
What version of the library are you using? I managed to get tremor working, but not tremolo. What errors do you get?
I've tried to compile the ogg and vorbis libraries found here using the build_for_iphoneos script:

Xiph.org: Downloads

No luck. I get some weird errors saying I need Ogg >= 1.0 to proceed.

I have no idea where to start for compiling Tremor or Tremolo. What's the difference between those 2 branches?

Right now - compiling anything would be nice.
marktronic is offline   Reply With Quote
Old 09-22-2011, 06:28 AM   #10 (permalink)
Registered Member
 
Join Date: Sep 2008
Location: Spain
Posts: 176
lefty is on a distinguished road
Default

You need Vorbis tremor Tremor - XiphWiki. It's is written for ARM processors and is faster than the PC version. It's quite easy to build, just include the files (not the example files) into your xcode project and change the "__arm__" to "_arm_".

P.S. Tremolo is meant to be faster, but uses an assembly syntax that isn't compatible with xcode.

Last edited by lefty; 09-22-2011 at 10:10 AM.
lefty is offline   Reply With Quote
Old 09-29-2011, 05:01 PM   #11 (permalink)
Registered Member
 
Join Date: Sep 2011
Posts: 4
marktronic is on a distinguished road
Default

Quote:
Originally Posted by lefty View Post
You need Vorbis tremor Tremor - XiphWiki. It's is written for ARM processors and is faster than the PC version. It's quite easy to build, just include the files (not the example files) into your xcode project and change the "__arm__" to "_arm_".

P.S. Tremolo is meant to be faster, but uses an assembly syntax that isn't compatible with xcode.
I checked that out. Added it to my Xcode project and remove the 2 example files, win32 folder, debian and doc folders, but get errors on the #include <ogg/ogg.h> files.

But that said, I actually realized I need the full (floating point) version of Ogg+Vorbis. Are you able to compile that?
marktronic is offline   Reply With Quote
Old 10-11-2011, 11:37 AM   #12 (permalink)
Registered Member
 
Raffaello's Avatar
 
Join Date: Apr 2011
Posts: 91
Raffaello is on a distinguished road
Default

I've used libogg/libvorbis before in my games, but I replaced the music files later by mp3 to take advantage of hardware decoding on the iPhones.
Can't help you with compilation problems, but if you search for it on google theres a website that contains lots of pre compiled libraries for iOS, including those two (I'm not at home so I don't have the link right now though)
__________________
My games:
Raffaello is offline   Reply With Quote
Old 10-12-2011, 01:35 AM   #13 (permalink)
Registered Member
 
Join Date: Sep 2011
Posts: 4
marktronic is on a distinguished road
Default

Quote:
Originally Posted by Raffaello View Post
I've used libogg/libvorbis before in my games, but I replaced the music files later by mp3 to take advantage of hardware decoding on the iPhones.
Can't help you with compilation problems, but if you search for it on google theres a website that contains lots of pre compiled libraries for iOS, including those two (I'm not at home so I don't have the link right now though)
If you could post that link, I would greatly appreciate it! Haven't had any luck on a few google searches trying to find it. :/
marktronic is offline   Reply With Quote
Old 10-12-2011, 06:20 AM   #14 (permalink)
Registered Member
 
Raffaello's Avatar
 
Join Date: Apr 2011
Posts: 91
Raffaello is on a distinguished road
Default

Sure, here it is:
/ - sdl-static - Pre-compiled static libraries for SDL on various systems. - Google Project Hosting
__________________
My games:
Raffaello is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 401
11 members and 390 guests
7twenty7, ChrisYates, djohnson, Duncan C, gmarro, hussain1982, Kirkout, Retouchable, SLIC, walex, xzoonxoom
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,679
Threads: 94,128
Posts: 402,921
Top Poster: BrianSlick (7,990)
Welcome to our newest member, xzoonxoom
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:06 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0