All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Bernhard Gerlach <gerlacbd@emt.iis.fhg.de>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: creating/deleting MIDI events
Date: Tue, 21 Oct 2003 09:36:44 +0200 (METDST)	[thread overview]
Message-ID: <Pine.HPX.4.33n.0310210928580.2396-100000@studcom.urz.uni-halle.de> (raw)
In-Reply-To: <3F93E3ED.8080807@emt.iis.fhg.de>

Bernhard Gerlach wrote:
> How do create a pointer and allocate memory to variables of type
> snd_seq_event to generate events by software? The function
> snd_seq_create_event doesn't exist anymore...

Use a standard pointer, and malloc/calloc/whateveralloc.
You can allocate events directly on the stack (without pointers), too.

> snd_seq_event * event;
> snd_seq_event_input( handle, &event );
>
> This allocates memory, but how do I release it? The function
> snd_seq_free_event is marked as deprecated and seems to be empty.

The event lives in some internal buffer managed by the ALSA library.
Simply don't do anything to free it.

The event buffer may be reused by the next snd_seq_event_input() call.


HTH
Clemens




-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54

  reply	other threads:[~2003-10-21  7:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-20 13:32 creating/deleting MIDI events Bernhard Gerlach
2003-10-21  7:36 ` Clemens Ladisch [this message]
2003-10-21  9:25 ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.HPX.4.33n.0310210928580.2396-100000@studcom.urz.uni-halle.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=gerlacbd@emt.iis.fhg.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.