feliwir / feliwir/SharpAudio

System.NullReferenceException on Raspberry PI - how to debug?

オープン
#45 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C#
スター
194
フォーク
20
PR マージ指標
30日以内にマージされた PR はありません

説明

Hey there,

I tried SharpAudio on Raspberry PI and got an Exception. I already installed `openal`:

```bash
ldconfig -p | grep openal
libopenal.so.1 (libc6,hard-float) => /lib/arm-linux-gnueabihf/libopenal.so.1

```

I think, that SharpAudio might fail to load the library for some reason, but unfortunately I have no idea how to debug this...

- The wav file exists
- `openal` is installed
- `libopenal.so.1` exists

Here is the code I used:
```c#
var soundFile = "testing.wav";
if (!File.Exists(soundFile))
{
Console.WriteLine(soundFile + " does not exist");
}
else
{
var engine = AudioEngine.CreateDefault();
var soundStream = new SoundStream(File.OpenRead(soundFile), engine);
soundStream.Play();

var timer = new Stopwatch();
timer.Start();
while (soundStream.IsPlaying && timer.ElapsedMilliseconds < 5000)
{
Thread.Sleep(50);
}
soundStream.Stop();
}
```

And the exception:
```
System.NullReferenceException: Object reference not set to an instance of an object.
at SharpAudio.BufferChain..ctor(AudioEngine engine)
at SharpAudio.Codec.SoundSink..ctor(AudioEngine audioEngine, Submixer submixer, ISoundSinkReceiver receiver)
at SharpAudio.Codec.SoundStream..ctor(Stream stream, AudioEngine engine, Submixer mixer)
at App.Run(String deviceNode)
```

Could you please help me out again? :-) Thank you

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。