Skip to content

Commit

Permalink
Corrects issue #77 where hw:0 devices were not written to when using …
Browse files Browse the repository at this point in the history
…the python example scripts and alsa.writeback=no
  • Loading branch information
ravelox committed May 14, 2020
1 parent c80962e commit 009e9ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion raveloxmidi/src/net_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ static raveloxmidi_socket_t *net_socket_create_item( void )
new_socket->fd = 0;
new_socket->packet = NULL;
new_socket->type = RAVELOXMIDI_SOCKET_FD_TYPE;
new_socket->card_number = 0;
new_socket->card_number = -1;

#ifdef HAVE_ALSA
alsa_buffer_size = config_int_get("alsa.input_buffer_size");
Expand Down
4 changes: 2 additions & 2 deletions raveloxmidi/src/raveloxmidi_alsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ void raveloxmidi_alsa_dump_rawmidi( void *data )
snd_rawmidi_t *rawmidi = NULL;
snd_rawmidi_info_t *info = NULL;
snd_rawmidi_params_t *params = NULL;
int card_number = 0;
int card_number = -1;
unsigned int device_number = 0, rawmidi_flags = 0;
const char *name = NULL, *hw_id = NULL, *hw_driver_name = NULL, *handle_id = NULL, *sub_name = NULL;
size_t available_min = 0, buffer_size = 0;
Expand Down Expand Up @@ -339,7 +339,7 @@ int raveloxmidi_alsa_write( unsigned char *buffer, size_t buffer_size, int origi
handle = (snd_rawmidi_t *)data_table_item_get( outputs, i );
if( handle )
{
int card_number = 0;
int card_number = -1;
int writeback = 0;

card_number = raveloxmidi_alsa_card_number( handle );
Expand Down

0 comments on commit 009e9ce

Please sign in to comment.