1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#region WebTuner - Verbindung herstellen
private void F1TS1_TUNE_IN_Click(object sender, EventArgs e)
{
// Verbindung zum WebStream - Server herstellen
Bass.BASS_StreamFree(_stream);
stream_url = TB_URL.Text;
// den Stream erstellen - mp3 -Stream
bool isWMA = false;
if (stream_url != String.Empty)
{
_stream = Bass.BASS_StreamCreateURL(stream_url, 0, BASSFlag.BASS_STREAM_STATUS, myStreamCreateURL, IntPtr.Zero);
if (_stream == 0)
{
// auf WMA streams zugreifen
_stream = BassWma.BASS_WMA_StreamCreateFile(stream_url, 0, 0, BASSFlag.BASS_DEFAULT);
if (_stream != 0)
isWMA = true;
else
{
// Fehlerbehandlung
TSStatusLabel2.Text = "Es konnte keine Verbindung hergestellt werden ...";
return;
}
}
// den stream abspielen
Bass.BASS_ChannelPlay(_stream, false);
}
#endregion
|