mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-09 13:30:06 -05:00
remove some printf, add some more debug
This commit is contained in:
parent
4b2520d173
commit
613216613e
3 changed files with 5 additions and 6 deletions
|
|
@ -360,14 +360,13 @@ direct_loop (void *user_data)
|
||||||
buffer->data[0].data = (uint8_t *)my_areas[0].addr + (offset * sizeof (uint16_t) * 2);
|
buffer->data[0].data = (uint8_t *)my_areas[0].addr + (offset * sizeof (uint16_t) * 2);
|
||||||
buffer->data[0].size = frames * sizeof (uint16_t) * 2;
|
buffer->data[0].size = frames * sizeof (uint16_t) * 2;
|
||||||
|
|
||||||
printf ("fill data\n");
|
|
||||||
this->event_cb (&this->node, &event,this->user_data);
|
this->event_cb (&this->node, &event,this->user_data);
|
||||||
|
|
||||||
spi_buffer_unref ((SpiBuffer *)event.data);
|
spi_buffer_unref ((SpiBuffer *)event.data);
|
||||||
}
|
}
|
||||||
if (this->input_buffer) {
|
if (this->input_buffer) {
|
||||||
if (this->input_buffer != &this->buffer.buffer) {
|
if (this->input_buffer != &this->buffer.buffer) {
|
||||||
printf ("copy input !\n");
|
/* FIXME, copy input */
|
||||||
}
|
}
|
||||||
spi_buffer_unref (this->input_buffer);
|
spi_buffer_unref (this->input_buffer);
|
||||||
this->input_buffer = NULL;
|
this->input_buffer = NULL;
|
||||||
|
|
@ -416,6 +415,8 @@ spi_alsa_start (SpiALSASink *this)
|
||||||
CHECK (set_hwparams (this), "hwparams");
|
CHECK (set_hwparams (this), "hwparams");
|
||||||
CHECK (set_swparams (this), "swparams");
|
CHECK (set_swparams (this), "swparams");
|
||||||
|
|
||||||
|
snd_pcm_dump (this->state.handle, this->state.output);
|
||||||
|
|
||||||
state->running = true;
|
state->running = true;
|
||||||
if ((err = pthread_create (&state->thread, NULL, direct_loop, this)) != 0) {
|
if ((err = pthread_create (&state->thread, NULL, direct_loop, this)) != 0) {
|
||||||
printf ("can't create thread: %d", err);
|
printf ("can't create thread: %d", err);
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,8 @@ typedef struct _SpiALSASink SpiALSASink;
|
||||||
|
|
||||||
|
|
||||||
static const char default_device[] = "default";
|
static const char default_device[] = "default";
|
||||||
static const uint32_t default_buffer_time = 500000;
|
static const uint32_t default_buffer_time = 40000;
|
||||||
static const uint32_t default_period_time = 100000;
|
static const uint32_t default_period_time = 20000;
|
||||||
static const bool default_period_event = 0;
|
static const bool default_period_event = 0;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
||||||
|
|
@ -410,8 +410,6 @@ on_event (SpiNode *node, SpiEvent *event, void *user_data)
|
||||||
{
|
{
|
||||||
AppData *data = user_data;
|
AppData *data = user_data;
|
||||||
|
|
||||||
printf ("got event %d\n", event->type);
|
|
||||||
|
|
||||||
switch (event->type) {
|
switch (event->type) {
|
||||||
case SPI_EVENT_TYPE_REQUEST_DATA:
|
case SPI_EVENT_TYPE_REQUEST_DATA:
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue