On Fri, 29 Dec 2006 16:35:18 +0100
Sebastian Schäfer <[EMAIL PROTECTED]> wrote:

> (the output is a bit tweaked as I added fprintf() to every
> function to see where it crashes)

Is it fprintf(stderr, ...) or fprintf(stdout, ...) ?

It should be fprintf(stderr, ...) because stdout is buffered, so you might
simply miss a few printouts just before the "Segmentation fault".

At all, the "Segmentation fault" happens at a strange location, that's
because connectPortMChMBEq looks like this:

static void connectPortMChMBEq
  (
  LADSPA_Handle instance,
  unsigned long port,
  LADSPA_Data *data
  )
  {
  switch(port)
    {
    // PERL_BEGIN
    case MBEQ_BAND_LOW:
      (*(MChMBEq *)instance).band_gain_ptr_low = data;
      break;

    case MBEQ_BAND_00:
      (*(MChMBEq *)instance).band_gain_ptr_00 = data;
      break;
...
    case MBEQ_BAND_29:
      (*(MChMBEq *)instance).band_gain_ptr_29 = data;
      break;

    case MBEQ_BAND_HIGH:
      (*(MChMBEq *)instance).band_gain_ptr_high = data;
      break;

    case MBEQ_INPUT_L:
      (*(MChMBEq *)instance).input_L = data;
      break;
    case MBEQ_INPUT_R:
      (*(MChMBEq *)instance).input_R = data;
      break;
    case MBEQ_OUTPUT_L:
      (*(MChMBEq *)instance).output_L = data;
      break;
    case MBEQ_OUTPUT_R:
      (*(MChMBEq *)instance).output_R = data;
      break;
    // PERL_END
    } // switch(port)
  } // static void connectPortMChMBEq

i.e. assignments are to already allocated structure fields, and during
an earlier call all the assignments completed without a segmentation
fault.

--Sergei.

--
-- 
Visit my http://appsfromscratch.berlios.de/ open source project.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to