Skip to content

Commit

Permalink
ut
Browse files Browse the repository at this point in the history
  • Loading branch information
olofkallander committed Oct 10, 2023
1 parent e0d20e6 commit 2f2e6e6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions test/integration/ConfIntegrationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ TEST_F(IntegrationTest, plain)
EXPECT_EQ(data.amplitudeProfile[0].second, 0);

EXPECT_NEAR(data.amplitudeProfile.back().second, 1826, 250);
EXPECT_NEAR(data.amplitudeProfile.back().first, 48000 * 0.79, 48000 * 0.2);
EXPECT_NEAR(data.amplitudeProfile.back().first, 48000 * 1.79, 48000 * 0.2);
}

EXPECT_EQ(data.audioSsrcCount, 1);
Expand Down Expand Up @@ -236,7 +236,7 @@ TEST_F(IntegrationTest, ptime10)
EXPECT_EQ(data.amplitudeProfile[0].second, 0);

EXPECT_NEAR(data.amplitudeProfile.back().second, 1826, 250);
EXPECT_NEAR(data.amplitudeProfile.back().first, 48000 * 0.79, 48000 * 0.2);
EXPECT_NEAR(data.amplitudeProfile.back().first, 48000 * 1.79, 48000 * 0.2);
}

EXPECT_EQ(data.audioSsrcCount, 1);
Expand Down Expand Up @@ -612,7 +612,7 @@ TEST_F(IntegrationTest, conferencePort)
EXPECT_EQ(data.amplitudeProfile[0].second, 0);

EXPECT_NEAR(data.amplitudeProfile.back().second, 1826, 250);
EXPECT_NEAR(data.amplitudeProfile.back().first, 48000 * 0.79, 48000 * 0.2);
EXPECT_NEAR(data.amplitudeProfile.back().first, 48000 * 1.79, 48000 * 0.2);
}

EXPECT_EQ(data.audioSsrcCount, 1);
Expand Down Expand Up @@ -1005,7 +1005,7 @@ TEST_F(IntegrationTest, confList)
EXPECT_EQ(data.amplitudeProfile[0].second, 0);

EXPECT_NEAR(data.amplitudeProfile.back().second, 1826, 250);
EXPECT_NEAR(data.amplitudeProfile.back().first, 48000 * 0.79, 48000 * 0.2);
EXPECT_NEAR(data.amplitudeProfile.back().first, 48000 * 1.79, 48000 * 0.2);
}

EXPECT_EQ(data.audioSsrcCount, 1);
Expand Down
2 changes: 1 addition & 1 deletion test/integration/IntegrationCallTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ TEST_P(IntegrationCallTypesTest, party3AllModes)
EXPECT_EQ(data.amplitudeProfile[0].second, 0);

EXPECT_NEAR(data.amplitudeProfile.back().second, 1826, 250);
EXPECT_NEAR(data.amplitudeProfile.back().first, 48000 * 1.60, 48000);
EXPECT_NEAR(data.amplitudeProfile.back().first, 48000 * 1.80, 48000);
}

EXPECT_EQ(data.audioSsrcCount, 1);
Expand Down
8 changes: 4 additions & 4 deletions test/integration/IntegrationLegApiTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ TEST_F(IntegrationLegApi, plain)
EXPECT_EQ(data.amplitudeProfile[0].second, 0);

EXPECT_NEAR(data.amplitudeProfile.back().second, 1826, 250);
EXPECT_NEAR(data.amplitudeProfile.back().first, 48000 * 0.79, 48000 * 0.2);
EXPECT_NEAR(data.amplitudeProfile.back().first, 48000 * 1.79, 48000 * 0.2);
}

EXPECT_EQ(data.audioSsrcCount, 1);
Expand Down Expand Up @@ -209,10 +209,10 @@ TEST_F(IntegrationLegApi, twoClientsAudioOnly)
{
const auto data = analyzeRecording<SfuClient<ColibriChannel>>(group.clients[id].get(), 5, true);
EXPECT_EQ(data.dominantFrequencies.size(), 1);
EXPECT_EQ(data.amplitudeProfile.size(), 2);
if (data.amplitudeProfile.size() > 1)
EXPECT_EQ(data.amplitudeProfile.size(), 4);
if (data.amplitudeProfile.size() > 2)
{
EXPECT_NEAR(data.amplitudeProfile[1].second, 5725, 100);
EXPECT_NEAR(data.amplitudeProfile.back().second, 5725, 100);
}
if (data.dominantFrequencies.size() >= 1)
{
Expand Down
2 changes: 1 addition & 1 deletion test/integration/emulator/AudioSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ memory::UniquePacket AudioSource::getPacket(uint64_t timestamp)
}
_phase += samplesPerPacket * 2 * M_PI * _frequency / codec::Opus::sampleRate;

if (_packetCount++ < 150)
if (_packetCount++ < 50)
{
// create noise floor
for (uint64_t x = 0; x < samplesPerPacket; ++x)
Expand Down

0 comments on commit 2f2e6e6

Please sign in to comment.