Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: spawny on June 13, 2009, 07:42:53 AM

Title: openal and rockbox
Post by: spawny on June 13, 2009, 07:42:53 AM
Hello I'm a french studient in Computer Science
Excuse me for my bad english
For my project I use an MP3 player, an Sansa E200 where Rockox is already install
But I use an emulation of it
My teacher asked me to sonorized a game of the MP3 player with Openal
I have choosen the game "Pong"
Is it possible to "install" Openal on it?
And if the aswer is Yes
How can I "install" Openal on?

Thank you for your answer
Title: Re: openal and rockbox
Post by: bluebrother on June 13, 2009, 11:53:41 AM
OpenAL is an API for audio. Rockbox audio API is completely different, and you can't simply "install" OpenAL (as well as other Linux packages) on Rockbox -- Rockbox is not a Linux port but has its own kernel. Therefore it's completely incompatible with software designed to run on any major OS. I'm not familiar with Rockbox audio API to tell how much work it would be to port OpenAL to Rockbox, but I bet it would be at least lots of work -- if it's feasible at all. As far as I can tell from the Wikipedia entry on OpenAL it is designed for 3D audio -- nothing Rockbox does. Also, I wouldn't be surprised if OpenAL used dynamic memory (haven't checked), something that Rockbox doesn't support.
Title: Re: openal and rockbox
Post by: saratoga on June 13, 2009, 01:22:06 PM
If its just pong it'll be much easier to write your own code then to port OpenAL.
Title: Re: openal and rockbox
Post by: GodEater on June 13, 2009, 01:24:18 PM
I'm flummoxed.

How would you write a "pong" implementation with an Audio API ?
Title: Re: openal and rockbox
Post by: bluebrother on June 13, 2009, 02:36:14 PM
How would you write a "pong" implementation with an Audio API ?

Well, technically speaking the task itself is impossible in the first place:

My teacher asked me to sonorized a game of the MP3 player with Openal

There is no player with OpenAL at all, so it's impossible to write a game for a player with OpenAL. Unless you create a player with OpenAL first, of course ;)
Title: Re: openal and rockbox
Post by: spawny on June 13, 2009, 03:39:18 PM
But the game is my final goal
In a first time I would like to play a sound for example if the user use the roght button
But for that I must have openal on the MP3 player
The game with sound is if I have time
But I have only 2 or 3 days
I have spent one month on this project
And after 2 weeks, I have understood the system of Source and Listener
The problem is that I have too much work
projects, exams and doing everything is impossible
Title: Re: openal and rockbox
Post by: saratoga on June 13, 2009, 05:44:47 PM
But for that I must have openal on the MP3 player

Rockbox doesn't use openal. 
Title: Re: openal and rockbox
Post by: spawny on June 14, 2009, 04:40:04 AM
I don't want to install completly openal in rockbox just making a tiny library to use soud in games
for example use few functions of openal that I put in the code of the game to use those sound funtions

 
Title: Re: openal and rockbox
Post by: bluebrother on June 14, 2009, 05:48:00 AM
I don't want to install completly openal in rockbox just making a tiny library to use soud in games

And why do you need OpenAL for that? Rockbox *does* have an API for playing back sounds. What's the point in using an API that is not supported? Just for the sake of using it? There's *absolutely* no point in using OpenAL on Rockbox.
Title: Re: openal and rockbox
Post by: GodEater on June 14, 2009, 05:58:52 AM
Easy there, he already said *why* - it's because that's what his teacher has asked him to do.

Unfortunately, it can't be done on Rockbox, and he's out of luck.

Title: Re: openal and rockbox
Post by: bluebrother on June 14, 2009, 07:47:05 AM
Easy there, he already said *why* - it's because that's what his teacher has asked him to do.

Well, I still don't understand why his teacher wants him to do that as it's simply impossible -- I'd expect a teacher to at least have some basic idea in advance if some task is doable at all. Which leds me to the questions what "asked" means in this case -- is it something like "you get extra credits if you get this done" or rather a "it's a test / exam you need to pass"?

To quote myself:
Well, technically speaking the task itself is impossible in the first place:
regardless why his teacher wants him to do that it's impossible -- he could do something like that without using OpenAL, or he could do it with OpenAL on a system that does support OpenAL. The combination however is impossible, and both he and his teacher need to accept this. Especially if there is no time to port the required OpenAL parts to Rockbox (if that's feasible at all).
Title: Re: openal and rockbox
Post by: spawny on June 14, 2009, 10:23:49 AM
but I have looked the functon used but my project consist in "spacialization of the sound" not only play a sound, play the sound on the left headphone if the sound comes from the right-hand side and the same for the right.
Title: Re: openal and rockbox
Post by: GodEater on June 14, 2009, 12:07:27 PM
That should be perfectly possible with Rockbox's own Audio APIs.