mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Make sure to empty the capture and return that instead.
--HG-- branch : androidmic
This commit is contained in:
@@ -408,17 +408,18 @@ void Audio::setDistanceModel(DistanceModel distanceModel)
|
||||
|
||||
const std::vector<love::audio::RecordingDevice*> &Audio::getRecordingDevices()
|
||||
{
|
||||
// If recording permission is not granted, inform user about it
|
||||
// and return empty list.
|
||||
if (!hasRecordingPermission())
|
||||
{
|
||||
showRecordingPermissionMissingDialog();
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<std::string> devnames;
|
||||
std::vector<love::audio::RecordingDevice*> devices;
|
||||
|
||||
// If recording permission is not granted, inform user about it
|
||||
// and return empty list.
|
||||
if (!hasRecordingPermission() && getRequestRecordingPermission())
|
||||
{
|
||||
showRecordingPermissionMissingDialog();
|
||||
capture.clear();
|
||||
return capture;
|
||||
}
|
||||
|
||||
std::string defaultname(alcGetString(NULL, ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER));
|
||||
|
||||
//no device name obtained from AL, fallback to reading from device
|
||||
|
||||
Reference in New Issue
Block a user