static const unsigned std_sample_rates[] =
{48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000};
-void profile_init(alsa_device_profile* profile, int direction)
+static void profile_reset(alsa_device_profile* profile)
{
profile->card = profile->device = -1;
- profile->direction = direction;
/* Fill the attribute arrays with invalid values */
size_t index;
profile->is_valid = false;
}
+void profile_init(alsa_device_profile* profile, int direction)
+{
+ profile->direction = direction;
+ profile_reset(profile);
+}
+
bool profile_is_initialized(alsa_device_profile* profile)
{
return profile->card >= 0 && profile->device >= 0;
}
void profile_decache(alsa_device_profile* profile) {
- profile->card = profile->device = -1;
+ profile_reset(profile);
}
/*