2026-01-09 12:48:09 -05:00
|
|
|
/**
|
|
|
|
|
* @file AudioDevice.cpp
|
2026-01-18 12:53:55 -06:00
|
|
|
* @brief Initializes the audio device with the specified mode and channel
|
|
|
|
|
* configuration.
|
2026-01-09 12:48:09 -05:00
|
|
|
* @param mode The open mode for the device (e.g., read, write).
|
|
|
|
|
* @param channel The channel configuration (Mono, Left, Right, Both).
|
|
|
|
|
* @return True if initialization is successful, false otherwise.
|
|
|
|
|
*/
|
2025-10-14 13:12:57 +02:00
|
|
|
|
2026-01-18 12:53:55 -06:00
|
|
|
#include "AudioDevice.h"
|
2025-10-14 13:12:57 +02:00
|
|
|
|
2026-01-18 12:53:55 -06:00
|
|
|
bool AudioDevice::initialize(OpenMode mode, Channel channel) {
|
|
|
|
|
m_channel = channel;
|
|
|
|
|
|
|
|
|
|
// open and ensure we are unbuffered if possible
|
|
|
|
|
return QIODevice::open(mode | QIODevice::Unbuffered);
|
|
|
|
|
}
|