Autor Beitrag
Massiv
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 93



BeitragVerfasst: So 29.03.09 17:37 
Hallo

ich möchte gerne das durhc ein buttonklick der nächste eintrag in der listbox ausgewählt und abgespielt wird!
wie geht das?
Regan
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2157
Erhaltene Danke: 72


Java (Eclipse), Python (Sublimetext 3)
BeitragVerfasst: So 29.03.09 18:18 
user profile iconMassiv hat folgendes geschrieben Zum zitierten Posting springen:
Hallo

ich möchte gerne das durhc ein buttonklick der nächste eintrag in der listbox ausgewählt und abgespielt wird!
wie geht das?

In dem du den Itemindex erhöst!?
Massiv Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 93



BeitragVerfasst: So 29.03.09 18:24 
hab ich ich hab folgenden code eingegeben:
ausblenden Delphi-Quelltext
1:
listbox1.ItemIndex:= +1;					

aber dann lüft immer noch das andere musik und nicht das neuausgewählte
auch wenn ich den code so schriebe, läuft immer noch die vorherige abgespielte musik:
ausblenden Delphi-Quelltext
1:
2:
listbox1.ItemIndex:= +1;
bassdllplayer1.play
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: So 29.03.09 18:50 
Ich schätze mal das sollte so sein.
ausblenden Delphi-Quelltext
1:
ListBox1.ItemIndex:=ListBox1.ItemIndex +1;					

Ich benutz die Komponente nicht, aber ich schätze du musst dann den alten Titel stoppen - freigeben und den nächsten dann starten.
Massiv Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 93



BeitragVerfasst: Mo 30.03.09 17:40 
[zitat]Ich benutz die Komponente nicht, aber ich schätze du musst dann den alten Titel stoppen - freigeben und den nächsten dann starten.[/zitat]
ich hab den code so ausprobiert aber es fnzt nicht!
ausblenden Delphi-Quelltext
1:
2:
3:
4:
ListBox1.ItemIndex:=ListBox1.ItemIndex +1;
bassdllplayer1.Stop;
bassdllplayer1.Free;(hab auch FreeOnRelease und FreeInstance ausprobiert)
bassdllplayer1.Play

mit bassdllplayer1.free gib ich doch die musik frei oder nicht?
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: Mo 30.03.09 17:47 
Ne, bassdllplayer.free gibt höchstwahrscheinlich den ganzen bassplayer wieder frei. Danach dürfte dein Programm dann abstürzen.

Woher weiß der Player denn überhaupt, was du abspielen willst?

_________________
We are, we were and will not be.
Massiv Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 93



BeitragVerfasst: Mo 30.03.09 17:53 
und wie soll ich den code dann schreiben?:(
Yogu
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2598
Erhaltene Danke: 156

Ubuntu 13.04, Win 7
C# (VS 2013)
BeitragVerfasst: Mo 30.03.09 19:47 
Du musst dem Player wieder sagen, welche Datei er abspielen soll. Das hast du ja offensichtlich schon mal geschafft, nämlich bevor er das erste Lied abspielt. Und das kommt zwischen Stop und Play rein :idea:
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Mo 30.03.09 20:18 
Das Freigeben des Channles wird vermutlich die Komponente übernehmen. Das hat Blackheart vermutlich gemeint, mit freigeben. Den Bassplayer zerstören kann ja nicht in deinem Sinn gewesen sein ;) (.Free kapselt nämlich .Destroy ;) )

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
Massiv Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 93



BeitragVerfasst: Di 31.03.09 14:01 
hab das in den button reingeschriebn und er markerit zwar den nächsten listbox eintrag aber spielt nix mehr ab, warum?
ausblenden Delphi-Quelltext
1:
2:
3:
4:
ListBox1.ItemIndex:=ListBox1.ItemIndex +1;
bassdllplayer1.Stop;
BassdllPlayer1.LoadFromFile(ListBox1.Items.Strings[ListBox1.ItemIndex]);
bassdllplayer1.Play
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: Di 31.03.09 14:05 
Steht denn in der Listbox der ganze Pfad rin, oder nur der Dateiname? Wenn ich mich recht erinnere, hast du in einem vorigen Topic ja gefragt, wie man den ganzen Pfad da raus nimmt, jetzt hast du den Salat. ;-)

_________________
We are, we were and will not be.
Massiv Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 93



BeitragVerfasst: Di 31.03.09 14:07 
Gausi, in der listbox steht der ganze Pfad, ich hab immer noch nicht gescheckt wie man das ohne macht^^
hat das problem damit was zu tun?
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: Di 31.03.09 14:15 
Es hätte was damit zu tun, wenn es so wäre. ;-)

So bin ich jetzt auch etwas ratlos, da ich den Bassplayer auch nicht so gut kenne. :nixweiss:

_________________
We are, we were and will not be.
Massiv Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 93



BeitragVerfasst: Di 31.03.09 14:31 
Ich habs nochmal getestet und mir ist aufgefallen, dass es nur nicht funzt wenn die musik nicht am laufen ist, abr wenn die musik am laufen its und ich listbox um eins runteschiebe mit dem ebend aufgelistetem code dann funzt es^^

dennoch thx