[DEV] add open stream with his name
This commit is contained in:
parent
ec75a59720
commit
7a75911770
@ -8,7 +8,8 @@
|
||||
# interface : "alsa", "pulse", "core", ...
|
||||
interface:"alsa",
|
||||
# name of the interface
|
||||
name:"default",
|
||||
# name:"default",
|
||||
name:"hw:0,0",
|
||||
},
|
||||
# frequency to open device
|
||||
frequency:48000,
|
||||
@ -26,7 +27,8 @@
|
||||
io:"output",
|
||||
map-on:{
|
||||
interface:"alsa",
|
||||
name:"default",
|
||||
#name:"default",
|
||||
name:"hw:0,0",
|
||||
},
|
||||
frequency:48000,
|
||||
channel-map:[
|
||||
|
@ -133,15 +133,23 @@ river::io::NodeAirTAudio::NodeAirTAudio(const std::string& _name, const std11::s
|
||||
}
|
||||
}
|
||||
}
|
||||
// TODO : Check if the devace with the specific name exist ...
|
||||
/*
|
||||
if (deviceId == -1) {
|
||||
RIVER_ERROR("Can not find the " << streamName << " audio interface ... (use O default ...)");
|
||||
deviceId = 0;
|
||||
}
|
||||
*/
|
||||
|
||||
// Open specific ID :
|
||||
m_info = m_adac.getDeviceInfo(deviceId);
|
||||
if (deviceId == -1) {
|
||||
m_info = m_adac.getDeviceInfo(streamName);
|
||||
} else {
|
||||
m_info = m_adac.getDeviceInfo(deviceId);
|
||||
}
|
||||
// display property :
|
||||
{
|
||||
RIVER_INFO("Device " << deviceId << " property :");
|
||||
RIVER_INFO("Device " << deviceId << " - '" << streamName << "' property :");
|
||||
m_info.display();
|
||||
|
||||
if (etk::isIn(hardwareFormat.getFormat(), m_info.nativeFormats) == false) {
|
||||
@ -200,6 +208,8 @@ river::io::NodeAirTAudio::NodeAirTAudio(const std::string& _name, const std11::s
|
||||
// open Audio device:
|
||||
airtaudio::StreamParameters params;
|
||||
params.deviceId = deviceId;
|
||||
params.deviceName = streamName;
|
||||
// TODO : Remove limit of 2 channels ...
|
||||
if (m_isInput == true) {
|
||||
m_info.inputChannels = 2;
|
||||
params.nChannels = 2;
|
||||
|
Loading…
Reference in New Issue
Block a user