Commit b240bb7a authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#3459] Fix broken audio layer test

parent 467a62fd
......@@ -77,7 +77,6 @@ void DcBlocker::process (SFLDataFormat *data, int nbBytes)
int nbSamples = nbBytes / sizeof(SFLDataFormat);
for (int i = 0; i < nbSamples; i++) {
_debug("i: %d", i);
_x = data[i];
_y = (SFLDataFormat) ( (float) _x - (float) _xm1 + 0.9999 * (float) _ym1);
......
......@@ -91,11 +91,12 @@ void AudioLayerTest::testPulseConnect() {
CPPUNIT_ASSERT (_pulselayer->getLayerType() == PULSEAUDIO);
std::string alsaPlugin;
int numCardIn, numCardOut, sampleRate, frameSize;
int numCardIn, numCardOut, numCardRing, sampleRate, frameSize;
alsaPlugin = manager->getConfigString(AUDIO, ALSA_PLUGIN);
numCardIn = manager->getConfigInt(AUDIO, ALSA_CARD_ID_IN);
numCardOut = manager->getConfigInt(AUDIO, ALSA_CARD_ID_OUT);
numCardRing = manager->getConfigInt(AUDIO, ALSA_CARD_ID_RING);
sampleRate = manager->getConfigInt(AUDIO, AUDIO_SAMPLE_RATE);
frameSize = manager->getConfigInt(AUDIO, ALSA_FRAME_SIZE);
......@@ -105,7 +106,7 @@ void AudioLayerTest::testPulseConnect() {
_pulselayer->setErrorMessage(-1);
try {
CPPUNIT_ASSERT (_pulselayer->openDevice (numCardIn, numCardOut, sampleRate, frameSize, SFL_PCM_BOTH, alsaPlugin) == true);
CPPUNIT_ASSERT (_pulselayer->openDevice (numCardIn, numCardOut, numCardRing, sampleRate, frameSize, SFL_PCM_BOTH, alsaPlugin) == true);
} catch (...) {
_debug ("Exception occured wile opening device! ");
}
......@@ -128,14 +129,14 @@ void AudioLayerTest::testPulseConnect() {
CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->disconnectStream() == true);
CPPUNIT_ASSERT (_pulselayer->getRecordStream()->disconnectStream() == true);
CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->connectStream() == true);
CPPUNIT_ASSERT (_pulselayer->getRecordStream()->connectStream() == true);
CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->connectStream(NULL) == true);
CPPUNIT_ASSERT (_pulselayer->getRecordStream()->connectStream(NULL) == true);
CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->getStreamState() == 1);
CPPUNIT_ASSERT (_pulselayer->getRecordStream()->getStreamState() == 1);
CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->connectStream() == true);
CPPUNIT_ASSERT (_pulselayer->getRecordStream()->connectStream() == true);
CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->connectStream(NULL) == true);
CPPUNIT_ASSERT (_pulselayer->getRecordStream()->connectStream(NULL) == true);
CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->getStreamState() == 1);
CPPUNIT_ASSERT (_pulselayer->getRecordStream()->getStreamState() == 1);
......
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