0
0

I cannot load as sample [u:25vvonhi]stereo[/u:25vvonhi] mp3 file with FORCEMONO and 3dpos without
Access violation at FEEEFEEE.
Example code I paste bellow, full BCB6 project (with all templates) should be [url=http://tvtom.pl/coach/www/fmoderror.rar]here
[/url] (if server will :P).

[code:25vvonhi]
// Form with OpenDialog1 and Button1 needed.

void __fastcall TForm1::Button1Click(TObject Sender)
{
if (OpenDialog1->Execute())
{
FSOUND_SAMPLE *samp2 = 0;
char
templ;
templ = OpenDialog1->FileName.c_str();
samp2 = FSOUND_Sample_Load(0, templ, FSOUND_MPEGACCURATE | FSOUND_16BITS | FSOUND_FORCEMONO, 0, 0);
if (!samp2)
{
ShowMessage("Error: No sample loaded");
}

float vector[3]={10,0,0};
bool check=FSOUND_3D_SetAttributes(0,&vector[0],NULL);
if (!check) ShowMessage("3D failed");
else FSOUND_Update();

float listenerpos[3]={0,0,0};
FSOUND_3D_Listener_SetAttributes(&listenerpos[0], NULL, 0, 0, 1.0f, 0, 1.0f, 0);

int test;
test = FSOUND_PlaySound(0, samp2);
if (test==-1)
    {
    ShowMessage("Error w FSOUND_PlaySound");
    }

}

}
[/code:25vvonhi]

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.