Author Topic: Newbie to streaming ASX/WMA  (Read 6435 times)

Sheep

  • Posts: 243
Newbie to streaming ASX/WMA
« on: 29 May '03 - 12:55 »
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

  • Posts: 499
Re: Newbie to streaming ASX/WMA
« Reply #1 on: 30 May '03 - 00:09 »
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

  • Posts: 243
Re: Newbie to streaming ASX/WMA
« Reply #2 on: 30 May '03 - 09:03 »
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

  • Posts: 499
Re: Newbie to streaming ASX/WMA
« Reply #3 on: 30 May '03 - 16:12 »
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

  • Posts: 243
Re: Newbie to streaming ASX/WMA
« Reply #4 on: 30 May '03 - 19:32 »
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? :)

Code: [Select]

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

  • Posts: 499
Re: Newbie to streaming ASX/WMA
« Reply #5 on: 31 May '03 - 12:21 »
The little sample is part of my shareware app http://www.mbstudio.biz and it works fine here.

Sheep

  • Posts: 243
Re: Newbie to streaming ASX/WMA
« Reply #6 on: 2 Jun '03 - 02:37 »
yes your thing works, but why my code not? Anyone idea's?  ??? ??? ???

Ian @ un4seen

  • Administrator
  • Posts: 26222
Re: Newbie to streaming ASX/WMA
« Reply #7 on: 2 Jun '03 - 14:07 »
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

  • Posts: 243
Re: Newbie to streaming ASX/WMA
« Reply #8 on: 3 Jun '03 - 16:10 »
your contest works perfect, so i have totally not an idea why my code doesn't work.


Ian @ un4seen

  • Administrator
  • Posts: 26222
Re: Newbie to streaming ASX/WMA
« Reply #9 on: 3 Jun '03 - 17:18 »
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

  • Posts: 243
Re: Newbie to streaming ASX/WMA
« Reply #10 on: 4 Jun '03 - 08:19 »
I do exactly this.

Code: [Select]

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

  • Posts: 335
Re: Newbie to streaming ASX/WMA
« Reply #11 on: 5 Jun '03 - 12:56 »

Quote
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.


Just for giggles, try this filename variation...

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


Sheep

  • Posts: 243
Re: Newbie to streaming ASX/WMA
« Reply #12 on: 9 Jun '03 - 11:51 »
That did the job! Thank you!!  :-*