Skip to content

Commit

Permalink
Ditch attempts trying to obtain sound duration of MP3s
Browse files Browse the repository at this point in the history
Crashes on Linux. Apparently returns incorrect values on Windows.
  • Loading branch information
z33ky committed Sep 5, 2024
1 parent a999c79 commit 359fcb7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sp/src/game/shared/SoundEmitterSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,11 @@ class CSoundEmitterSystem : public CBaseGameSystem

if ( duration )
{
*duration = enginesound->GetSoundDuration( pSample );
if ( Q_stristr( pSample, ".mp3" ) ) {
*duration = 0;
} else {
*duration = enginesound->GetSoundDuration( pSample );
}
}

TraceEmitSound( "EmitAmbientSound: Raw wave emitted '%s' (ent %i)\n",
Expand Down

0 comments on commit 359fcb7

Please sign in to comment.