*** Invalid sample rate (16000) for sound 'music\innocent_win_new.mp3'.


*** Invalid sample rate (16000) for sound 'music\innocent_win_new.mp3'.

I’m getting the error above when trying to play custom sounds that I’m using for a end of round music script that eventually will be edited to play random tunes based off of who won the round.


resource.AddFile("sound/music/innocent_win_new.mp3")

hook.Add("TTTEndRound", "WinMusic", function(wintype)
    if wintype == WIN_INNOCENT then
        BroadcastLua('surface.PlaySound("sound/music/innocent_win_new.mp3")')
    elseif wintype == WIN_TRAITOR then
        BroadcastLua('surface.PlaySound("sound/music/music/innocent_win_new.mp3")')
    elseif wintype == WIN_TIMELIMIT then
        BroadcastLua('surface.PlaySound("sound/music/innocent_win_new.mp3")')
    end
end)

I’ve checked the files are there client side and I can play them with a media player. Now I’ve downloaded and modified the sounds to be 16000 hz by 16 kbps and re-uploaded and it’s giving me the same error. I even renamed the file so that it wouldn’t get confused with the old one.

Does anyone know a program/method of editing sounds to be compatible?

Thanks.

I just noticed in the console that I’m also getting the error.


Failed to load sound "sound\music\music\innocent_win_new.mp3", file probably missing from disk/repository
Y

So I’ll work on that.

[editline]20th May 2013[/editline]

I have figured out my issue as a reference for anyone else with this problem go to thispage.