0
0

on some mpegs it is unable to get the current levels.

[code:1j2igg2u]void __fastcall Tfrm_Player1::btn_PlayClick(TObject *Sender)
{
FSOUND_SetOutput(FSOUND_OUTPUT_DSOUND );
FSOUND_SetDriver(0);
FSOUND_SetMixer(FSOUND_MIXER_AUTODETECT);
FSOUND_Init (44100, 32, FSOUND_INIT_GLOBALFOCUS);

handle=FSOUND_Stream_Open("E:\\Video\\Rammstein - Keine Lust.mpg",0, 0, 0);
FSOUND_DSP_SetActive(FSOUND_DSP_GetFFTUnit(), TRUE);

FSOUND_Stream_Play (0,handle);
tim_Player1->Enabled = true;

}

void __fastcall Tfrm_Player1::tim_Player1Timer(TObject Sender)
{
float
f;
float l,r;

f=FSOUND_DSP_GetSpectrum();
FSOUND_GetCurrentLevels(0,&l,&r);

l=l*16;
r=r*16;

int il = (int)l;
int ir = (int)r;

TColor CBlack = (RGB(0,0,0));
img_PegelLeft->Picture->Bitmap = bmp;
img_PegelLeft->Canvas->Brush->Color = CBlack;
img_PegelLeft->Canvas->Rectangle(0, 0, 20, (img_PegelLeft->Height - ileft*il));

}[/code:1j2igg2u]

what can i do?

  • You must to post comments
0
0

mpg? Is that a video file?

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.