Reply
Thread Tools
mikec's Avatar
Posts: 1,366 | Thanked: 1,185 times | Joined on Jan 2006
#1
I've compiled fluidsynth in scratchbox, and got it running on my n900. but it cant seem to find the Alsa sequencer device /dev/snd/seq.

Anyone know where it is. Its referenced in Alsa conf

do I need to compile the alsa modules?
__________________
N900_Email_Options Wiki Page
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#2
Use PulseAudio as sink instead. I wrote a quick and dirty version like this:
Code:
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;
}
Works good enough for me and my hack.
 
mikec's Avatar
Posts: 1,366 | Thanked: 1,185 times | Joined on Jan 2006
#3
ah, i'm using python, and fuidsynth has a python binding. Are you using pulse audio as a sequencer?
__________________
N900_Email_Options Wiki Page
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#4
The "compiled fluidsynth in scratchbox" fooled me.

As of now, I'm only using PA as a sink for audio data, nothing more. But depending on what you want to do, PA offers (almost too) many ways to mangle your sound data.
 

The Following User Says Thank You to Joorin For This Useful Post:
Posts: 13 | Thanked: 12 times | Joined on Mar 2010
#5
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)
 
mikec's Avatar
Posts: 1,366 | Thanked: 1,185 times | Joined on Jan 2006
#6
Originally Posted by joliclic View Post
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)
Thanks, the config entry is already in the N900 alsa conf file. I suspect the driver module needs to be compiled and installed.
__________________
N900_Email_Options Wiki Page
 
Reply


 
Forum Jump


All times are GMT. The time now is 22:14.