aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/opensl.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-12-17 03:06:52 -0800
committerChris Robinson <[email protected]>2020-12-17 03:06:52 -0800
commit4d1ac95ae2ef1ca3a20205b4cc9893b02f0c7c22 (patch)
tree6d10b74a983ee2495704f010d554f5bfb26e63af /alc/backends/opensl.cpp
parentd578bc6cb1b9bce4954ded9b138d51980163c233 (diff)
Don't return an enum from captureSamples
It's always no_error
Diffstat (limited to 'alc/backends/opensl.cpp')
-rw-r--r--alc/backends/opensl.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/alc/backends/opensl.cpp b/alc/backends/opensl.cpp
index 185c9999..11a6a9eb 100644
--- a/alc/backends/opensl.cpp
+++ b/alc/backends/opensl.cpp
@@ -174,7 +174,7 @@ struct OpenSLPlayback final : public BackendBase {
std::mutex mMutex;
- ALuint mFrameSize{0};
+ uint mFrameSize{0};
std::atomic<bool> mKillNow{true};
std::thread mThread;
@@ -632,8 +632,8 @@ struct OpenSLCapture final : public BackendBase {
void open(const ALCchar *name) override;
void start() override;
void stop() override;
- ALCenum captureSamples(al::byte *buffer, ALCuint samples) override;
- ALCuint availableSamples() override;
+ void captureSamples(al::byte *buffer, uint samples) override;
+ uint availableSamples() override;
/* engine interfaces */
SLObjectItf mEngineObj{nullptr};
@@ -643,9 +643,9 @@ struct OpenSLCapture final : public BackendBase {
SLObjectItf mRecordObj{nullptr};
RingBufferPtr mRing{nullptr};
- ALCuint mSplOffset{0u};
+ uint mSplOffset{0u};
- ALuint mFrameSize{0};
+ uint mFrameSize{0};
DEF_NEWDEL(OpenSLCapture)
};
@@ -864,7 +864,7 @@ void OpenSLCapture::stop()
}
}
-ALCenum OpenSLCapture::captureSamples(al::byte *buffer, ALCuint samples)
+void OpenSLCapture::captureSamples(al::byte *buffer, uint samples)
{
SLAndroidSimpleBufferQueueItf bufferQueue{};
if LIKELY(mDevice->Connected.load(std::memory_order_acquire))
@@ -918,12 +918,10 @@ ALCenum OpenSLCapture::captureSamples(al::byte *buffer, ALCuint samples)
i += rem;
}
-
- return ALC_NO_ERROR;
}
-ALCuint OpenSLCapture::availableSamples()
-{ return static_cast<ALuint>(mRing->readSpace()*mDevice->UpdateSize - mSplOffset); }
+uint OpenSLCapture::availableSamples()
+{ return static_cast<uint>(mRing->readSpace()*mDevice->UpdateSize - mSplOffset); }
} // namespace