🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.multimedia
1 messages
1 total messages Started by Onkel Gilbert Wed, 21 Mar 2001 16:50
MediaPlayer: Out of Resources
#1300
Author: Onkel Gilbert
Date: Wed, 21 Mar 2001 16:50
34 lines
1842 bytes
Hello,

I've got an OpenDialog, a ListBox and a MediaPlayer.
I open mp3 files and calculate the length. No my problem is,
if I open to much files (like 5 or more) I get a Exeption
"Out of Resources", do you now, where my problem is?

My code:

//----------------------
 if (OpenDialog2->Execute())
  {
    for (int jj = 0; jj < OpenDialog2->Files->Count ; jj++)
      ListBox2->Items->Add( OpenDialog2->Files->Strings[jj].c_str() );
  }
//---------------------
  int iLengthMin;
  float fLengthSek;
  for (int jj = 0; jj < ListBox2->Items->Count ; jj++)
  {
    MyMediaPlayer->FileName = ListBox2->Items->Strings[jj].c_str();
    MyMediaPlayer->Open();

    iLengthMin = MyMediaPlayer->TrackLength[1]/1000/60;
    fLengthSek = ((float)MyMediaPlayer->TrackLength[1]/1000/60 -
iLengthMin) * 60;

    MyMediaPlayer->Close();
  }
//---------------------


                        thanks for helping
                            Gilbert
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads