Commit f482ba8f authored by atraczyk's avatar atraczyk Committed by gerrit2

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
......@@ -25,12 +25,12 @@
namespace ring {
DcBlocker::DcBlocker(unsigned channels /* = 1 */)
: states(channels, (struct StreamState){0, 0, 0, 0})
: states(channels, StreamState{0, 0, 0, 0})
{}
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)
......@@ -58,7 +58,7 @@ void DcBlocker::process(AudioBuffer& buf)
const size_t chans = buf.channels();
const size_t samples = buf.frames();
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;
for(i=0; i<chans; i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment