Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
miniaudio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
miniaudio
Commits
84605a0f
Commit
84605a0f
authored
Mar 06, 2019
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some Android bugs.
parent
ffa14e94
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
mini_al.h
mini_al.h
+5
-5
No files found.
mini_al.h
View file @
84605a0f
...
...
@@ -20424,7 +20424,7 @@ mal_result mal_device_init__aaudio(mal_context* pContext, const mal_device_confi
}
if (pConfig->deviceType == mal_device_type_playback || pConfig->deviceType == mal_device_type_duplex) {
result = mal_open_stream__aaudio(pContext, mal_device_type_
capture, pConfig->capture.pDeviceID, pConfig->capture.shareMode, pConfig, pDevice, (mal_AAudioStream**)&pDevice->aaudio.pStreamCapture
);
result = mal_open_stream__aaudio(pContext, mal_device_type_
playback, pConfig->playback.pDeviceID, pConfig->playback.shareMode, pConfig, pDevice, (mal_AAudioStream**)&pDevice->aaudio.pStreamPlayback
);
if (result != MAL_SUCCESS) {
return result; /* Failed to open the AAudio stream. */
}
...
...
@@ -21490,18 +21490,18 @@ mal_result mal_device_stop__opensl(mal_device* pDevice)
/* TODO: Wait until all buffers have been processed. Hint: Maybe SLAndroidSimpleBufferQueue::GetState() could be used in a loop? */
if (pDevice->type == mal_device_type_capture || pDevice->type == mal_device_type_duplex) {
SLresult resultSL = MAL_OPENSL_
PLAY(pDevice->opensl.pAudioPlayer)->SetPlayState((SLPlayItf)pDevice->opensl.pAudioPlayer, SL_PLAY
STATE_STOPPED);
SLresult resultSL = MAL_OPENSL_
RECORD(pDevice->opensl.pAudioRecorder)->SetRecordState((SLRecordItf)pDevice->opensl.pAudioRecorder, SL_RECORD
STATE_STOPPED);
if (resultSL != SL_RESULT_SUCCESS) {
return mal_post_error(pDevice, MAL_LOG_LEVEL_ERROR, "[OpenSL] Failed to stop internal
playback
device.", MAL_FAILED_TO_STOP_BACKEND_DEVICE);
return mal_post_error(pDevice, MAL_LOG_LEVEL_ERROR, "[OpenSL] Failed to stop internal
capture
device.", MAL_FAILED_TO_STOP_BACKEND_DEVICE);
}
MAL_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueueCapture)->Clear((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueueCapture);
}
if (pDevice->type == mal_device_type_playback || pDevice->type == mal_device_type_duplex) {
SLresult resultSL = MAL_OPENSL_
RECORD(pDevice->opensl.pAudioRecorder)->SetRecordState((SLRecordItf)pDevice->opensl.pAudioRecorder, SL_RECORD
STATE_STOPPED);
SLresult resultSL = MAL_OPENSL_
PLAY(pDevice->opensl.pAudioPlayer)->SetPlayState((SLPlayItf)pDevice->opensl.pAudioPlayer, SL_PLAY
STATE_STOPPED);
if (resultSL != SL_RESULT_SUCCESS) {
return mal_post_error(pDevice, MAL_LOG_LEVEL_ERROR, "[OpenSL] Failed to stop internal
capture
device.", MAL_FAILED_TO_STOP_BACKEND_DEVICE);
return mal_post_error(pDevice, MAL_LOG_LEVEL_ERROR, "[OpenSL] Failed to stop internal
playback
device.", MAL_FAILED_TO_STOP_BACKEND_DEVICE);
}
MAL_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueuePlayback)->Clear((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueuePlayback);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment