Skip to content
Snippets Groups Projects
Commit f482ba8f authored by Andreas Traczyk's avatar Andreas Traczyk Committed by gerrit2
Browse files

audio: remove C99 compound literals

- Microsoft's compiler doesn't support C99 compound literals.
  This patch replaces these expressions with C++11 unnamed
  temporary list initializations.

Change-Id: I23d1aa5beb2ae0b7ae73ff02b5a5897ee83b2979
Tuleap: #790
parent 90af05ea
No related branches found
No related tags found
No related merge requests found
...@@ -25,12 +25,12 @@ ...@@ -25,12 +25,12 @@
namespace ring { namespace ring {
DcBlocker::DcBlocker(unsigned channels /* = 1 */) DcBlocker::DcBlocker(unsigned channels /* = 1 */)
: states(channels, (struct StreamState){0, 0, 0, 0}) : states(channels, StreamState{0, 0, 0, 0})
{} {}
void DcBlocker::reset() void DcBlocker::reset()
{ {
states.assign(states.size(), (struct StreamState){0, 0, 0, 0}); states.assign(states.size(), StreamState{0, 0, 0, 0});
} }
void DcBlocker::doProcess(AudioSample *out, AudioSample *in, unsigned samples, struct StreamState * state) void DcBlocker::doProcess(AudioSample *out, AudioSample *in, unsigned samples, struct StreamState * state)
...@@ -58,7 +58,7 @@ void DcBlocker::process(AudioBuffer& buf) ...@@ -58,7 +58,7 @@ void DcBlocker::process(AudioBuffer& buf)
const size_t chans = buf.channels(); const size_t chans = buf.channels();
const size_t samples = buf.frames(); const size_t samples = buf.frames();
if (chans > states.size()) if (chans > states.size())
states.resize(buf.channels(), (struct StreamState){0, 0, 0, 0}); states.resize(buf.channels(), StreamState{0, 0, 0, 0});
unsigned i; unsigned i;
for(i=0; i<chans; i++) { for(i=0; i<chans; i++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment