Autor Beitrag
n-regen
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 202
Erhaltene Danke: 2



BeitragVerfasst: Do 25.10.07 13:15 
Hallo!

Ich möchte gerne ein Programm schreiben, das Dateien über das Netzwerk streamt und auch gleich nach den ersten paar Datenpaketen anfängt, die Datei abzuspielen, wenn es eine MP3 ist.
Wie kriege ich das hin, dass das Programm die MP3 spielen kann, auch wenn sie unvollständig ist?

Danke im Voraus.
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Do 25.10.07 14:31 
Wenns ne mp3-Datei ist, und der Lesezugriff nicht gesperrt ist, einfach mit nem Player öffnen. Die emule-tmp-Dateien kann z.B. praktisch jeder Player abspielen, auch wenn gerade noch geladen wird. Wie das technisch genau umzusetzen ist, hängt davon ab, wie du streamst und die Daten empfängst, würde ich sagen.
Sollte sich bestimmt mit der bass.dll oder fmod irgendwie regeln lassen. Ob das Buffern in eine Datei und öffnen mit dem TMediaplayer funkioniert, weiß ich nicht.

_________________
We are, we were and will not be.
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Do 25.10.07 15:41 
Das MP3-Format ist ein Block-basiertes Format, ohne Container. von daher ist eine unvollständige Datei auch nur eine Datei, wo zahlreiche ungültige Blöcke ignoriert werden ...

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Dominique
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 92



BeitragVerfasst: Do 25.10.07 16:11 
Hier: Streaming Radio Library
Zitat:

Provides a pure-Delphi implementation of a streaming radio client (to receive MP3 audio from a streaming radio server) and server (to stream MP3 audio to a streaming radio client such as WinAmp). Full metadata support is included.

This package includes:

  • The streaming radio client:

    • Compatible with IceCast and ShoutCast
    • Connects to a streaming radio server and receives a live MP3 audio feed
    • Provides realtime MP3 audio data to your Delphi application

  • The streaming radio server:

    • Compatible with various media players such as WinAmp
    • Accepts connections from media players and feeds MP3 audio data to them
    • Allows your Delphi application to broadcast in realtime to media players

  • A example proxy application:

    • Uses both the client and server classes to act as a proxy
    • Connects to a remote streaming server to receive a live audio feed
    • Accepts connections from media players such as WinAmp and rebroadcasts the live audio feed to them


This class uses the Indy component library for all socket communication over the network. All processing tasks are performed asynchronously in a separate thread, so they should not interfere with the rest of your application, or cause your application to block.
This code is released as free software under the GNU General Public License.