SRL Archive - Delphi/FPC Help and Tutorials

Hermpie's All-In-One Delphi Apps


ShowerThoughts

2008-03-03 14:43:52

Hey, i though you all didn't like it if i would post new thread and new thread so i made this thread and here im going to post my nubby apps xD

Thank To:
3D buzz - For making the tut video's(they will never read this w/e they deserve it)



{=================]
Small Mp3 Player
[=================}
//Features:
//it's very small
//it's very basic and easy
//Plays Mp3
////////////////////////////
{=================]
Source Code
[=================}
//ps. you need the dll.
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,Bass, StdCtrls, ExtCtrls;

type
TForm1 = class(TForm)
BtnOpen: TButton;
BtnPlay: TButton;
OpenDlgSong: TOpenDialog;
BtnStop: TButton;
BtnPauze: TButton;
PnlDisplay: TPanel;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure BtnOpenClick(Sender: TObject);
procedure BtnPlayClick(Sender: TObject);
procedure BtnPauzeClick(Sender: TObject);
procedure BtnStopClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
Stream : HSTREAM;
implementation

{$R *.dfm}

procedure TForm1.BtnOpenClick(Sender: TObject);
begin
if OpenDlgSong.Execute = False then exit;
if Stream <> 0 then BASS_StreamFree(Stream);
Stream := Bass_StreamCreateFile(False, PChar( OpenDlgSong.FileName), 0, 0, 0);
if Stream = 0 then ShowMessage('Could not open the mp3 file!') else
begin
PnlDisplay.Caption := ExtractFileName(OpenDlgSong.FileName);


end;
end;

procedure TForm1.BtnPauzeClick(Sender: TObject);
begin
BASS_ChannelPause(Stream);
end;

procedure TForm1.BtnPlayClick(Sender: TObject);
begin
Bass_ChannelPlay(stream,False);
end;

procedure TForm1.BtnStopClick(Sender: TObject);
begin
BASS_ChannelStop(Stream);
BASS_ChannelSetPosition(Stream, 0);
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
if BASS_Init(-1, 44100, 0, Handle, nil) = False then ShowMessage('Audio Initialization Failed!');
end;

procedure TForm1.FormDestroy(Sender: TObject);
begin
Bass_Free();
end;

end.



KEEP Scrollbar or KICK it?

Naum

2008-03-03 15:12:07

cool dude!

Harry

2008-03-03 15:16:01

Lol, nice. Make it so it can shuffle songs like iTunes please? :)

And upload Bass.dll please so we can run it :p

Rikje

2008-03-03 15:18:50

He didn't work for me :(
i can't open it.

ShowerThoughts

2008-03-03 15:27:42

i know -.- uploading whole package xD

Rikje

2008-03-03 15:28:47

silly noob :p

i re-try tomorrow ;)

ShowerThoughts

2008-03-03 15:31:48

It is FIXED

Dan Cardin

2008-03-03 16:01:30

nice :). Works well too! just too bad i finished the videos and have a more complete version of it ;)


By DNA_Dan

ShowerThoughts

2008-03-03 16:12:20

it's ugly, that why i made my own look… but your is more complicated.
i need to download photshop first xD and screw somthing up and then ad buttons

Dan Cardin

2008-03-03 16:19:57

i quite like the look of mine :). i couldve customized it a lot more but…photoshop skills are needed so :(

ShowerThoughts

2008-03-04 10:46:23

UPDATED!!!!! Check The New Pic

exppo

2008-03-04 11:05:01

From: Dan Cardin
i quite like the look of mine :). i couldve customized it a lot more but…photoshop skills are needed so :(


If you do manage to customize post it so WE can all enjoy it :)

Exppo ;)

ShowerThoughts

2008-03-06 12:41:18

UPDATED!

new pic added