Newbie to streaming ASX/WMA

Started by Sheep,

Sheep

I am prety new into streaming things with bass.

But I would like to make this link working in my player:
http://staging.radio538.nl/media/radio538.asx

Is this possible with bass?
The asx file looks like this inside:

[Reference]
Ref1=http://81.23.233.74:80/radio538

XMPlay won't stream it and MediaPlayer 6.4 (i am using the old one), does the job.

So can ASX files be played, and is this the WMA format? Do i have to use the other dll?

Kind regards Sheep




MB_SOFT

Hi,
just pass http://81.23.233.74:80/radio538
to BASS_WMA_StreamCreateFile and Bass and BassWMA will do the job. That station play fine here.

Sheep

Hmmm ofcourse I've tried that before posting, could you give me a snippit of code, maybe I am doing something wrong.
Regards

MB_SOFT

Try:
file=http://81.23.233.74:80/radio538
BassHandle = BASS_WMA_StreamCreateFile(False, *file, 0, 0, BASS_STREAM_AUTOFREE)

then start play with BASS_StreamPlay

Be sure to have Windows MEdia Player 9 installed as some stations require v9 codecs.

Sheep

This code does not work. tested on 2 machines, one with XP and media player 9 one with windows 2000 with an old media player. When clicking on http://81.23.233.74:80/radio538 both machines play the file.

Ra ra ra pie pa po? :)

procedure TApp.Button1Click(Sender: TObject);
var
  filename : string;
begin
  filename := 'http://81.23.233.74:80/radio538';
  channel := BASS_WMA_StreamCreateFile(False, pchar(filename), 0, 0, BASS_STREAM_AUTOFREE);
  BASS_StreamPlay(channel,true,0);
end;

MB_SOFT

The little sample is part of my shareware app //www.mbstudio.biz and it works fine here.

Sheep

yes your thing works, but why my code not? Anyone idea's?  ??? ??? ???

Ian @ un4seen

It's playing fine here too. Have you tried playing that stream URL (not the ASX file) with the pre-compiled CONTEST.EXE example that comes with BASSWMA?

Sheep

your contest works perfect, so i have totally not an idea why my code doesn't work.


Ian @ un4seen

What are you doing with the "ref1=..." URL, are you opening it yourself to check if it's a playable stream? If so, that's the problem - you'll just get the same thing back from the server. Pass the URL to BASS_WMA_StreamCreateFile, and you should be fine.

Sheep

I do exactly this.

procedure TApp.Button1Click(Sender: TObject);
var
  filename : string;
  ch : integer;
begin
  //filename := 'http://staging.radio538.nl/media/radio538.asx';  
  filename := 'http://81.23.233.74:80/radio538';
  ch := BASS_WMA_StreamCreateFile(False, pchar(filename), 0, 0, BASS_STREAM_AUTOFREE);
  BASS_StreamPlay(ch,true,0);
end;

uncomments the other filename and it also doesn't work.
No errors, my connection led searches for a connection which stays on about 2 seconds and then it goes off. No sound no errors. And the app can receive input messages.

DanaPaul


QuoteNo errors, my connection led searches for a connection which stays on about 2 seconds and then it goes off. No sound no errors. And the app can receive input messages.

Just for giggles, try this filename variation...

filename := 'http://81.23.233.74:80/radio538' + #0;