Einzelnen Beitrag anzeigen

EWeiss
(Gast)

n/a Beiträge
 
#9

AW: Delphi type nach c#

  Alt 5. Nov 2014, 20:23
100% habe ich den Code nicht verstanden, aber ich versuche es mal

Code:
public WaveData GetWaveData()
{
  WaveData result = new WaveData();
  BassStream vizStream = _controller.PlaybackProcessor.VizStream;
  if (vizStream == null)
     return result;

  if (_externalState == PlayerState.Active)
  {
    if (BassWasapi.BASS_WASAPI_IsStarted())
    {
      BassWasapi.BASS_WASAPI_GetData(WaveData.Data , 2048);
    }
    else
    {
      Bass.BASS_ChannelGetData(vizStream.Handle, WaveData.Data, 2048);
    }
  }
  return result;
}
Hier ist es wichtig, wie die DLL-Aufrufe in C# deklariert sind.
Super.. Danke schön
Jetzt nur noch ein kleines Problem..

Zitat:
Error 2 Argument 1: cannot convert from 'short[]' to 'float[]' D:\MP 2.0\MediaPortal-2\MediaPortal\Source\UI\Players\BassPlayer\BassPla yer.cs 445 42 BassPlayer
BASS_WASAPI_GetData erwartet als Argument float[] ich muss aber short übergeben

Delphi
Delphi-Quellcode:
  TWaveData = array [0 .. 1023] of smallint; // Wave Data
  TWaveData32 = array [0 .. 1023] of Single; // 32 Bit Wave Data
gruss
  Mit Zitat antworten Zitat