23 May '13 - 06:47 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: [bug?] If BASS_UNICODE flag present in the BASS_StreamCreateURL, MMS won't play  (Read 2392 times)
fmcoder
Posts: 386


« on: 27 Jan '10 - 23:10 »
Reply with quoteQuote

Hello!

I found strange thing: if BASS_UNICODE flag presents in the BASS_StreamCreateURL call, then any "mms://..." stream doesn't play (returns error code 2). Using latest bass and basswma. There's nothing in the docs connecting this flag and this function...

Thanks!
Logged
radio42
Posts: 4012


« Reply #1 on: 28 Jan '10 - 09:43 »
Reply with quoteQuote

Just tried it here and it works fine.
Can you pls show your code how you used BASS_StreamCreateURL.
Logged
fmcoder
Posts: 386


« Reply #2 on: 28 Jan '10 - 15:16 »
Reply with quoteQuote

 Chan := BASS_StreamCreateURL(URL, 0, BASS_STREAM_STATUS or BASS_STREAM_BLOCK or NS.Flags, @StatusProc, Self);

NS.Flags is defined before, as:
   Flags := BASS_UNICODE or BASS_STREAM_DECODE or BASS_SAMPLE_FLOAT;
Logged
Ian @ un4seen
Administrator
Posts: 15269


« Reply #3 on: 28 Jan '10 - 15:33 »
Reply with quoteQuote

The BASS_UNICODE flag isn't actually supported by BASS_StreamCreateURL currently (except on WinCE), so I would expect that call to fail with error code 2 (BASS_ERROR_FILEOPEN) for any URL (not only "mms://").

In Delphi, passing the URL like this should sort it: PAnsiChar(AnsiString(url))
Logged
fmcoder
Posts: 386


« Reply #4 on: 28 Jan '10 - 16:44 »
Reply with quoteQuote

In Delphi, passing the URL like this should sort it: PAnsiChar(AnsiString(url))
That's exactly what I'm doing (the url is PAnsiChar type, and it's converted one line before call) - it works for HTTP streams and not for MMS.
Probably, that's the issue with BASSWMA, looks like it somehow considers the UNICODE flag.
Anyway, I already sorted this out, by not adding this flag... But I'm still interested where the bug is Smiley

Thanks.
Logged
Ian @ un4seen
Administrator
Posts: 15269


« Reply #5 on: 28 Jan '10 - 17:45 »
Reply with quoteQuote

Oh right, I see what you mean. Yes, BASSWMA does indeed support the BASS_UNICODE flag even for the URLs, because the same code is used for opening local files and URLs. For consistency, I guess the BASS_UNICODE flag should be blocked by BASSWMA with URLs, or perhaps support for it added in BASS_StreamCreateURL Smiley
Logged
fmcoder
Posts: 386


« Reply #6 on: 29 Jan '10 - 19:35 »
Reply with quoteQuote

Yes, it should be at least documented (I supposed, that any flag that is not supported by function, thrown away).
I spent about 2 hours finding what's wrong until I found this thing with UNICODE Smiley
Logged
Ian @ un4seen
Administrator
Posts: 15269


« Reply #7 on: 1 Feb '10 - 14:55 »
Reply with quoteQuote

Here's an update to try, with support for the BASS_UNICODE flag in BASS_StreamCreateURL...

   www.un4seen.com/stuff/bass.dll

As URLs are ASCII, it will simply convert the Unicode string to ASCII, and that is what BASS_CHANNELINFO.filename will receive (rather than the original Unicode version).
Logged
fmcoder
Posts: 386


« Reply #8 on: 1 Feb '10 - 18:12 »
Reply with quoteQuote

Thanks, I'll try it later today.
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines