jaime74 Posted July 23, 2010 Share Posted July 23, 2010 Hi all, I have strange problems getting sound files to play, no matter whether I am using the vanilla StreamMusic function or the more sophisticated "PlayMusicFile" function from scantis SoundCommands add-on. 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. I am wondering if anybody has faced this problem, too. What I do looks like this (both alternatives I have tested): StreamMusic "Data\Music\MyMusic\MyMusicFile.mp3"orPlayMusicFile "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 <my file>). This showed exactly the same behaviour (fade out - pause - fade in of the next random track). But the cell in which I need to stream my custom file is of type "Public" anyway.- 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? Link to comment Share on other sites More sharing options...
jaime74 Posted July 25, 2010 Author Share Posted July 25, 2010 Here we are: The problem is solved! I had to do a lot of research for myself, learning the basics of EnhancedMusicControls and StreamMusic.Though there are still some open questions, I got my custom tracks working fine. For details, read THIS thread. Cheers! :D Link to comment Share on other sites More sharing options...
Recommended Posts