I have tried to change the fmod CreateStreamURLto accept unicode filename using FMOD_UNICODE constant.
It seen I diddent go that to work, so I have not a glue what it wrong here, since unicode is very important in this app I have (im are currectly checking this wrapper out).
Her is the code I tried:
Another request is possible to change soundcard (but that part os not important to been useable in my application here).
NB. I do known BlitzMax itself dosent support unicode at file level, but I got a workaround this limit by using a Pure Basic wrapper which I can't release it here (because it a direct command wrapper).
NNB. This would never have a issue in Linux, since it use UTF8 instead, so it only a Windows issue.
It seen I diddent go that to work, so I have not a glue what it wrong here, since unicode is very important in this app I have (im are currectly checking this wrapper out).
Her is the code I tried:
Import Pub.Win32 Import Bah.FMod Global SoundSystem:TFMODSystem = New TFMODSystem.Create() SoundSystem.Init(32) Local sound1:TFMODSound = SoundSystem.CreateStreamURL("d:\some\path\to\unicode\based\file.mp3", FMOD_SOFTWARE & FMOD_UNICODE) If sound1<>Null Print "unicode file sound could open" sound1.SoundRelease() Else Print "unicode file could Not open" EndIf sound1:TFMODSound = SoundSystem.CreateStreamURL(Unicode2AscII$("d:\some\path\to\unicode\based\file.mp3"), FMOD_SOFTWARE & FMOD_UNICODE) If sound1<>Null Print "unicode file 2 sound could open" sound1.SoundRelease() Else Print "unicode file 2 could not open" EndIf sound1:TFMODSound = SoundSystem.CreateStreamURL("c:\works\fine.mp3", FMOD_SOFTWARE & FMOD_CREATESTREAM) If sound1<>Null Print "ascII file sound could open" sound1.SoundRelease() Else Print "ascII file could not open" EndIf sound1:TFMODSound = SoundSystem.CreateStreamURL("c:\works\fine.mp3", FMOD_SOFTWARE & FMOD_CREATESTREAM) If sound1<>Null Print "ascII file sound could open" sound1.SoundRelease() Else Print "ascII file could not open" EndIf SoundSystem.Close() SoundSystem.SystemRelease() Function Unicode2AscII$(a$) For Local i = 1 To Len(a$) Local char$=Mid(a$, i, 1) Local B$=Bin$(Asc(Char$)) Local Le$=Mid$(B$, 17, 8) Local Ri$=Mid$(B$, 25, 8) Result$=Result$+Chr$(Int("%"+Le$))+Chr$(Int("%"+Ri$)) Next Return A$ EndFunction
Another request is possible to change soundcard (but that part os not important to been useable in my application here).
NB. I do known BlitzMax itself dosent support unicode at file level, but I got a workaround this limit by using a Pure Basic wrapper which I can't release it here (because it a direct command wrapper).
NNB. This would never have a issue in Linux, since it use UTF8 instead, so it only a Windows issue.