|
2010-05-15
, 16:35
|
Posts: 726 |
Thanked: 345 times |
Joined on Apr 2010
@ Sweden
|
#2
|
static const pa_sample_spec ss = { .format = PA_SAMPLE_S16LE, .rate = 44100, .channels = 2 }; void* audio_init(void){ pa_simple *s = NULL; int error; if (!(s = pa_simple_new(NULL, "foospotify", PA_STREAM_PLAYBACK, NULL, "playback", &ss, NULL, NULL, &error))) { fprintf(stderr, __FILE__": pa_simple_new() failed: %s\n", pa_strerror(error)); return NULL; } return s; } int audio_exit (void *device) { int error; if (pa_simple_drain((pa_simple *)device, &error) < 0) { fprintf(stderr, __FILE__": pa_simple_drain() failed: %s\n", pa_strerror(error)); } pa_simple_free((pa_simple *)device); } int audio_play_pcm (void *device, struct pcm_data *pcm) { int error; if (pa_simple_write((pa_simple *)device, pcm->buf, (size_t)pcm->len, &error) < 0) { fprintf(stderr, __FILE__": pa_simple_write() failed: %s\n", pa_strerror(error)); return -1; } return 0; }
|
2010-05-15
, 17:55
|
|
Posts: 1,366 |
Thanked: 1,185 times |
Joined on Jan 2006
|
#3
|
|
2010-05-15
, 18:48
|
Posts: 726 |
Thanked: 345 times |
Joined on Apr 2010
@ Sweden
|
#4
|
The Following User Says Thank You to Joorin For This Useful Post: | ||
|
2010-05-17
, 07:19
|
Posts: 13 |
Thanked: 12 times |
Joined on Mar 2010
|
#5
|
|
2010-05-17
, 17:58
|
|
Posts: 1,366 |
Thanked: 1,185 times |
Joined on Jan 2006
|
#6
|
Perhaps this post can help you (?) :
http://talk.maemo.org/showpost.php?p=265996&postcount=4
Let us know (I'm interrested too by fluidsynth on the N900)
Anyone know where it is. Its referenced in Alsa conf
do I need to compile the alsa modules?
N900_Email_Options Wiki Page