Sound in VC++ mit sndPlaySound

Hi,
Ich habe ein kleines Prog in VC++ geschrieben, welches auf Befehl eine Sounddatei abspielen soll. Soweit funktioniert auch schon alles, leider wird die Sounddatei nur 10 sek lang abgespielt, obwohl sie viel länger ist.
Ich benutze die Funktion
sndPlaySound("Start.wav",SND_ASYNC);

Wie kann ich meine Sounddatei bis zum Ende abspielen?

thx im Vorraus
Noob
 
Hi noob,

hab diesbezüglich mal ein wenig in der MSDN rumgestöbert.

Quelle: MSDN - Playing Waveform-Audio Files
The sndPlaySound and PlaySound functions load an entire waveform-audio file into memory and, in effect, limit the size of file they can play. Use sndPlaySound and PlaySound to play waveform- audio files that are relatively small ? up to about 100K.
...
For larger sound files, use the Media Control Interface (MCI) services. For more information, see MCI.

Entweder Du schraubst die Quali runter bis es von der Länge passt - oder Du benutzt stattdessen das MCI.

Greetz
- Mr.Bit
 
grosses thx,
Ich hab die Qualität der Audio Datei jetzt swoeit reduziert, dass sie klein genug ist und komplett abgespielt wird. :D

mfg und thx
Noob
 
Zurück
Oben