Example #1
0
int HAE_MaxCaptureFormats(INT32 deviceID)
{
    if (!g_queriedFormats) {
	HAE_Setup();
    }
    return (g_maxFormats);
}
Example #2
0
// number of devices. ie different versions of the HAE connection. DirectSound and waveOut
// return number of devices. ie 1 is one device, 2 is two devices.
// NOTE: This function needs to function before any other calls may have happened.
INT32 HAE_MaxDevices(void) {

    /* let's see if HAE_Setup can be done successfully... */
    if (g_supports16 >= 0 || HAE_Setup() == 0) {
	return 1; // only AUDIODEV (defaulting to /dev/audio)
    }
    return 0;
}
Example #3
0
// Return 1, if sound hardware support 8 bit output, otherwise 0.
// some solaris drivers support 8bit u-law or a-law only, so they are not supported
// $$kk: 08.12.98 merge: changed this to return a real value 
int HAE_Is8BitSupported(void) {
    // $$kk: 06.28.99: we are sometimes calling these methods before InitGeneralSound,
    // which calls HAE_Setup().  we should probably not do this!  however, in the
    // meantime....
    if (g_supports8 < 0) {
	HAE_Setup();
    }

    return g_supports8;
}
Example #4
0
int HAE_GetSupportedCaptureFormats(INT32 deviceID, UINT32 *encodings,
				   UINT32 *sampleRates, UINT32 *channels,
				   UINT32 *bits, int maxFormats)
{
    // $$ay: Get the global values from HAE_Setup
    int formats;
    if (!g_queriedFormats) {
	HAE_Setup();
    }
    for (formats = 0; formats < maxFormats; formats++) {
	encodings[formats] = g_supEncodings[formats];
	sampleRates[formats] = g_supSampleRates[formats];
	channels[formats] = g_supChannels[formats];
	bits[formats] = g_supBits[formats];
    }
    return maxFormats;

}