AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Programmieren allgemein EAccessViolation mit Codeoptimierung
Thema durchsuchen
Ansicht
Themen-Optionen

EAccessViolation mit Codeoptimierung

Ein Thema von turboPASCAL · begonnen am 12. Nov 2005 · letzter Beitrag vom 13. Nov 2005
 
Benutzerbild von turboPASCAL
turboPASCAL

Registriert seit: 8. Mai 2005
Ort: Sondershausen
4.274 Beiträge
 
Delphi 6 Personal
 
#1

EAccessViolation mit Codeoptimierung

  Alt 12. Nov 2005, 16:03
Delphi-Quellcode:
type
  FSOUND_SAMPLE = record

    buff: Punsignedchar; // pointer to sound data
    ...
  end;
  PFSOUND_SAMPLE = ^FSOUND_SAMPLE;

  FSOUND_CHANNEL = record
    index: int; // position in channel pool.
    volume: int; // current volume (00-FFh).
    frequency: int; // speed or rate of playback in hz.
    pan: int; // panning value (00-FFh).
    actualvolume: int; // driver level current volume.
    actualpan: int; // driver level panning value.
    sampleoffset: unsignedint; // sample offset (sample starts playing from here).

    sptr: PFSOUND_SAMPLE; // currently playing sample

    ...
  end;

  PFSOUND_CHANNEL = ^FSOUND_CHANNEL;


procedure...
...
  asm
        push   ebp
        mov   ebx, mix_mixptr
        mov   mix_mixbuffptr, ebx

        mov   ecx, cptr
        mov   mix_cptr, ecx

        cmp   ecx, 0 // if (!cptr) ...
        je   @MixExit // ... then skip this channel!

>>>--> mov   ebx, [ecx+FSOUND_CHANNEL.sptr] // load the correct SAMPLE pointer
                                               // for this channel

        mov   mix_sptr, ebx // store sample pointer away
        cmp   ebx, 0 // if (!sptr) ...
        je   @MixExit // ... then skip this channel!

        // get pointer to sample buffer
        mov   eax, [ebx+FSOUND_SAMPLE.buff]
        mov   mix_samplebuff, eax
...
Wieso kommt hier eine EAccessViolation ? Wenn ich in den Optionen vom Compiler die Codeoptimierung abschalte {$O-} gibt es keine Probleme.
Matti
Meine Software-Projekte - Homepage - Grüße vom Rüsselmops -Mops Mopser
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:44 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz