I already posted this in the tesnexus forum, but received no answers yet. So I start a second try here.
I have strange problems getting sound files to play, no matter whether I am using the vanilla http://cs.elderscrolls.com/constwiki/index.php/StreamMusic function or the more sophisticated "PlayMusicFile" function from scantis http://cs.elderscrolls.com/constwiki/index.php/Category:SoundCommands add-on.
I know that there are many open issues related to StreamMusic, and I have spent some time scanning other posts on this topic here, but I think that my problem is not covered.
I am wondering if anybody has faced this issue, too.
At first I thought this would be a problem of StreamMusic only, but it doesn't work with PlayMusicFile either.
So I guess there must be some issue with file paths, though I can't find the clue.
What I do looks like this (both alternatives I have tested):
StreamMusic "Data\Music\MyMusic\MyMusicFile.mp3"or
PlayMusicFile "Data\Music\MyMusic\MyMusicFile.mp3"
The code is executed from within a quest script in the "gameMode" block, once whenever the player enters the specific cell.
I always face the same effect:
With StreamMusic, the current music, that was playing before, fades out, pauses for some seconds, and then another track from the same type (public, dungeon or default, depending what is defined for the cell) starts playing again. According to the documentation, this should only happen when the track to play cannot be found, e.g. due to an invalid filename or path.
With PlayMusicFile, nothing happens at all. I suppose that the reason in both cases is the same.
After hours of experimenting, I don't know what might cause this. I tried everything I could imagine to exclude whatever reason comes to my mind:
- I am absolutely sure that my file path is correct! I tried every possible combination, including both full and relative paths, both upper and lower case directory names, both custom and vanilla sound files, both forward and backward slashes, both mp3 and wav files etc.
- I also checked this on three different computers, always with the same effect.
- My sound system in general is working fine, I am even using BetterMusicSystem and SoundCommands without any issues, so I suppose that this is not a general sound problem. Disabling BetterMusicSystem and SoundCommands doesn't help either.
- I checked for all types of cell music (Public, Dungeon, Default).
- I also tried the workaround for "Default" type cells, which is explained in the documentation (in the TES CS Wiki, as linked above) for StreamMusic (i.e. call StreeamMusic random, then wait for some frames, then call StreamMusic
- Inside the cell which I am talking about, there's absolutely no enemy, no combat, no teleporting, load dorrs or whatever. This means, any of the well-known reasons that cause StreamMusic to interrrupt (i.e. combat, change cell etc.) cannot be the reason of the problem.
In conclusion, I suppose that for some very very weird reason my game engine can't find the sound files. but please note again that it makes no difference if I try to start a custom or one of the plain vanilla sound files. So I guess it's not the files, but rather something related to the paths. But I don't know...
Can anybody help me?