< prev index next >
src/java.desktop/unix/native/libjsound/PLATFORM_API_LinuxOS_ALSA_Ports.c
Print this page
rev 16232 : 8170798: Fix minor issues in java2d and sound coding.
*** 1,7 ****
/*
! * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 383,392 ****
--- 383,393 ----
int isPlayback = 0;
int isMono;
int isStereo;
char* type;
snd_mixer_selem_channel_id_t channel;
+ int i;
TRACE0("> PORT_GetControls\n");
if (id == NULL) {
ERROR0("Invalid handle!");
// $$mp: an error code should be returned.
*** 478,487 ****
--- 479,489 ----
if (control != NULL) {
controls[numControls++] = control;
}
}
}
+ for (i = numControls; i < 10; i++) { controls[i] = NULL; }
/* $$mp 2003-09-14: The following cast shouln't be necessary. Instead, the
declaration of PORT_NewCompoundControlPtr in Ports.h should be changed
to take a const char* parameter. */
portName = (char*) snd_mixer_selem_get_name(elem);
control = (creator->newCompoundControl)(creator, portName, controls, numControls);
< prev index next >