audio_in: fix compile errors when strict warnings are enabled

Fixes #4290
This commit is contained in:
Christian Prochaska 2021-10-07 19:03:17 +02:00 committed by Norman Feske
parent b337ee2f2b
commit d5d7915b4d
2 changed files with 14 additions and 10 deletions

View File

@ -36,10 +36,14 @@ namespace Audio_in {
enum { enum {
QUEUE_SIZE = 431, /* buffer queue size (~5s) */ QUEUE_SIZE = 431, /* buffer queue size (~5s) */
PERIOD = 512, /* samples per periode (~11.6ms) */
SAMPLE_RATE = 44100, SAMPLE_RATE = 44100,
SAMPLE_SIZE = sizeof(float), SAMPLE_SIZE = sizeof(float),
}; };
/**
* Samples per period (~11.6ms)
*/
static constexpr Genode::size_t PERIOD = 512;
} }
@ -265,7 +269,7 @@ class Audio_in::Session : public Genode::Session
{ {
protected: protected:
Stream *_stream; Stream *_stream { nullptr };
public: public:

View File

@ -29,8 +29,8 @@ namespace Audio_in {
struct Audio_in::Signal struct Audio_in::Signal
{ {
Genode::Signal_receiver recv; Genode::Signal_receiver recv { };
Genode::Signal_context context; Genode::Signal_context context { };
Genode::Signal_context_capability cap; Genode::Signal_context_capability cap;
Signal() : cap(recv.manage(&context)) { } Signal() : cap(recv.manage(&context)) { }
@ -46,7 +46,7 @@ class Audio_in::Session_client : public Genode::Rpc_client<Session>
Genode::Attached_dataspace _shared_ds; Genode::Attached_dataspace _shared_ds;
Signal _progress; Signal _progress { };
Genode::Signal_transmitter _data_avail; Genode::Signal_transmitter _data_avail;
@ -77,13 +77,13 @@ class Audio_in::Session_client : public Genode::Rpc_client<Session>
** Signals ** ** Signals **
*************/ *************/
void progress_sigh(Genode::Signal_context_capability sigh) { void progress_sigh(Genode::Signal_context_capability sigh) override {
call<Rpc_progress_sigh>(sigh); } call<Rpc_progress_sigh>(sigh); }
void overrun_sigh(Genode::Signal_context_capability sigh) { void overrun_sigh(Genode::Signal_context_capability sigh) override {
call<Rpc_overrun_sigh>(sigh); } call<Rpc_overrun_sigh>(sigh); }
Genode::Signal_context_capability data_avail_sigh() { Genode::Signal_context_capability data_avail_sigh() override {
return Genode::Signal_context_capability(); } return Genode::Signal_context_capability(); }
@ -91,7 +91,7 @@ class Audio_in::Session_client : public Genode::Rpc_client<Session>
** Session interface ** ** Session interface **
***********************/ ***********************/
void start() void start() override
{ {
call<Rpc_start>(); call<Rpc_start>();
@ -99,7 +99,7 @@ class Audio_in::Session_client : public Genode::Rpc_client<Session>
stream()->reset(); stream()->reset();
} }
void stop() { call<Rpc_stop>(); } void stop() override { call<Rpc_stop>(); }
/********************************** /**********************************