🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.multimedia
Article #1300

MediaPlayer: Out of Resources

#1300
From: 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
Technical Details
Message-ID: <3AB8DBCE.C8951605@MvA.ch>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!fu-berlin.de!bolzen.all.de!hirsch.in-berlin.de!news.mind.de!spamkiller.boerde.de!news.boerde.de!nntp.CS.Uni-Magdeburg.De!PeerFeed.KWeb.on.ca!dnews!194.230.247.73

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d0fc,f54b25237bf3a937,start
X-Google-Attributes: gid10d0fc,public
X-Google-ArrivalTime: 2001-03-22 21:12:06 PST
Message-ID: <3AB8DBCE.C8951605@MvA.ch>
Date: Wed, 21 Mar 2001 17:50:22 +0100
From: Onkel Gilbert <Gilbert@MvA.ch>
X-Mailer: Mozilla 4.75 [de] (Win98; U)
X-Accept-Language: de
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.multimedia
Subject: MediaPlayer: Out of Resources
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 194.230.247.73
X-Trace: 21 Mar 2001 08:50:32 -0800, 194.230.247.73
Lines: 35
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!fu-berlin.de!bolzen.all.de!hirsch.in-berlin.de!news.mind.de!spamkiller.boerde.de!news.boerde.de!nntp.CS.Uni-Magdeburg.De!PeerFeed.KWeb.on.ca!dnews!194.230.247.73