Active Topics

 


Reply
Thread Tools
Posts: 353 | Thanked: 263 times | Joined on Dec 2009 @ Finland
#1
Hi,

I was trying to make a simple metronome application and I got it working on my PC and it compiled nicely in scratchbox, but when I run it on the device (N900), I get SDL error "Unable to initialize SDL: pulse not available". This is the initialization code I use:
Code:
    if (SDL_Init(SDL_INIT_AUDIO) != 0) {
        printf("Unable to initialize SDL: %s\n", SDL_GetError());
        return 1;
    }
Nothing is done before that in the program's main function. Should SDL audio be initialized in some other way for it to work on N900? I haven't done any SDL programs with sound before.

Last edited by TNiga; 2010-01-27 at 14:54.
 
Posts: 353 | Thanked: 263 times | Joined on Dec 2009 @ Finland
#2
I changed SDL to use ALSA (export SDL_AUDIODRIVER=alsa) and the program runs, but the sound seems to play looped even though it shouldn't, and it doesn't on PC. What could be the problem?
 
SubCore's Avatar
Posts: 850 | Thanked: 626 times | Joined on Sep 2009 @ Vienna, Austria
#3
maybe the SDL version used in fremantle doesn't feature output to pulse yet...

does "export SDL_AUDIODRIVER=esd" work?
__________________
"What we perceive is not nature itself, but nature exposed to our method of questioning."
-- Werner Karl Heisenberg
 
Posts: 353 | Thanked: 263 times | Joined on Dec 2009 @ Finland
#4
Originally Posted by SubCore View Post
does "export SDL_AUDIODRIVER=esd" work?
Nope.

But alsa works fine, only problem is now the unwanted loop.
 
Posts: 353 | Thanked: 263 times | Joined on Dec 2009 @ Finland
#5
The problem was libsdl1.3 in scratchbox. Works fine when compiled using libsdl1.2.
 

The Following 2 Users Say Thank You to TNiga For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 21:25.