How Will The Pandora''s Audio Be Set Up, In Terms Of Software?


cb88 said:
ALSA where did i get it... well about 5 different distros XD

Debian Arch Ubuntu Puppylinux

Alsa is just a pain with ISA for no real reason ie BeOS detected my yahmaha ISA sound by default perhaps they had some proprietary know how though it is supposed to be supported by alsa have tried all DMA and IRQ combinations BIOS tells me nothing

as far as crackling on the AC97 that is intermittent and only happens in Linux

I know the difference between PA and ALSA ;-) and yes Linux sound is cursed... nobody should ever have to run alsaconf which a lot of times you don't but you get the idea
increases the buffer size for dmix on your ac97 system.
 
Last edited by a moderator:
lulzfish said:
I somehow managed to crash PulseAudio last night while watching YouTube.
It's really funny when you realize that all the videos are muted for no reason.
Even so, it wasn't Flash, I have a Firefox script that gives the FLV from YouTube to the embedded Totem player.
The Flash-plugin uses Alsa, and for some reason unknown to me, the ALSA plugin generates buffer overflows from time to time. And PA crashes on buffer owerflows, also for some dumb reason. Nothing we can do about it except to wait for a new version of PA.
(I use the Fedora Rawhide PA version (aka the pre-release version of PA) so I don't have this issue as often any more)
lulzfish said:
Also, are there tutorials for programming PulseAudio applications? All I can find on Google is stuff like "help pa broke everything" or "I think PA is a pretty cool guy, eh" or "How to get rid of PA", but I can't find any tutorials on how to use it in a program. I have the development libraries and I've tried one of the examples from PA's website, but the examples are just code, they're not really explained anywhere.

You can basically program for ESD and you get PulseAudio compatibility. Or OSS, or ALSA, if you have the right plugins for PA.
This, however, is not recommended.
If you want to use PA directly (recommended if you want very good sound support without crashes, good if you want more than one input/output at the same time, want to choose your sampling format, want to apply filters, want to get low-latency sound etc), then go here.
(I will use URLs in my post, because I made my forum fix GM script for a reason; read my sig)

(You will almost never have to use anything else than the Simple API, the Asynchronous API is overkill imho)
...or just use some high-level audio library like SDL, so that you don't have to care about sound at all.
 
Last edited by a moderator:
Well, I've been at that site and a similar one, but here's the problem I'm having:

1. I downloaded the development libraries for my system
2. I copied the source code for pacat-simple.c to try it out
3. I used pkg-config --cflags --libs libpulse libpulse-simple with gcc to compile it
4. It compiles, but it says "error: pa_simple_new: invalid argument" and I have no idea what argument is wrong. I'm passing default arguments, I've literally copied the example from the documentation.

And I thought about using SDL or something for abstraction, but I'm not sure if I want to bother with an additional library in between me and the hardware. I'll have to look into it since PulseAudio is being weird atm.
 
Last edited by a moderator:
'dflemstr' said:
The examples are outdated. Look in pulse/simple.h for the new function signature.
:angry:
It looks exactly the same..

"s = pa_simple_new(NULL, argv[0], PA_STREAM_PLAYBACK, NULL, "playback", &ss, NULL, NULL, &error)"

I'm passing everything it asks for. ss is a pa_sample_spec with format = PA_SAMPLE_S16LE, rate = 44100, and channels = 2.

Also, I tried SDL. Apparently out of the 3 or 4 drivers that are working perfectly that both SDL and my system should be able to agree on, none of them are 'available'.
How descriptive.
 
Last edited by a moderator:
I got SDL to open the sound device by setting SDL_AUDIODRIVER to esd, but there's no sound. It's probably my fault for not passing any data back.

thanks for the help with pulseaudio, I think I'll just use SDL from here.

edit: SDL is apparently not calling my audio callback function. This is bizarre.
 
Last edited by a moderator:
I typed up a small application for PA... Works without error on my machine...
Get it here.

EDIT: Attention!!
This app produces a very loud sine wave and some annoying random noise. Must be used with "pavucontrol" to avoid that your eardrums meet in the middle of your skull. So, install that, first.
 
I was lazy and made a project in Qt Creator (because I didn't want to make a Makefile)...
Ergo, I used qmake + make to compile it.

If you want to use gcc, it should work with this:
g++ -lpulse -lpulse-simple -o pulseaudio-example main.cpp

(I use g++ here because the file contains one "true" statement :p You could replace the "true" with "1" and then you can use gcc)

I'm on 0.9.14, btw
 
Last edited by a moderator:
I looked at simple.h from the 1.9.10 source code and it's exactly the same.
And SDL is still being weird: OSS, ALSA, and PA plugins all say "no available audio device", and the esd plugin randomly chooses between not setting up the sound or only calling my callback function once and then crapping itself.

FFFFFFFFUUUUUUUU
I'll have to move this to a PA or SDL forum soon, the question I started this thread for is long since answered.
 
Last edited by a moderator:
Wait... what?
Whya re you looking at the source code? It is almost certainly going to be different from your installed version. Look at /usr/include/pulse/* instead ;)
Do you have the dev packages?
 
Last edited by a moderator:
I don't think /usr/include will show anything of interest, since it compiles fine, but..

no, it's the exact same header.
It's the library itself that's failing and saying "invalid argument", I have the right function signature.
Between this and the problems with SDL connecting to PA, then not outputting sound, I suspect my PA server is just horribly broken somehow.

edit: Oh yeah, I got SDL to work by switching to the DSP driver. Then I tried padsp and got.. "Audio write: broken pipe"
 
Last edited by a moderator:
Back
Top