+ removed the access_addr crap from GstAlsaPad ... just use this->access_addr[channel] instead + completely reorganiz...

Original commit message from CVS:
+ removed the access_addr crap from GstAlsaPad ... just use
this->access_addr[channel] instead
+ completely reorganized and reindented code
+ removed the gst_alsa_sink_silence_on_channel function, needs to be completely
redone anyway
+ got alsasink to work on my machine finally ! yay !
This commit is contained in:
Leif Johnson 2003-01-27 12:59:24 +00:00
parent 6e8404d9bb
commit f032898326
2 changed files with 1191 additions and 1304 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,22 +1,21 @@
/* -*- c-basic-offset: 4 -*- */
/*
Copyright (C) 2001 CodeFactory AB
Copyright (C) 2001 Thomas Nyberg <thomas@codefactory.se>
Copyright (C) 2001-2002 Andy Wingo <apwingo@eos.ncsu.edu>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* Copyright (C) 2001 CodeFactory AB
* Copyright (C) 2001 Thomas Nyberg <thomas@codefactory.se>
* Copyright (C) 2001-2002 Andy Wingo <apwingo@eos.ncsu.edu>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __GST_ALSA_H__
@ -69,10 +68,10 @@ typedef struct {
gint channel;
GstPad *pad;
GstByteStream *bs;
/* pointer to where we can access mmap_areas */
char *access_addr;
/* buf and offset are only used for src elements to hold data from the sound
card, while we're waiting for an entire period_frames data. */
char *buf;
/* how much of the buffer we have used */
snd_pcm_uframes_t offset;
} GstAlsaPad;
@ -84,7 +83,6 @@ struct _GstAlsa {
gchar *device;
snd_pcm_stream_t stream;
snd_pcm_t *handle;
snd_output_t *out;
@ -104,6 +102,7 @@ struct _GstAlsa {
/* the gstreamer data */
gboolean data_interleaved;
gboolean autorecover;
/* access to the hardware */
gboolean access_interleaved;