Skip to content

Commit

Permalink
Fix build on watchOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne committed Apr 13, 2023
1 parent 82e304b commit 5be9934
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/monotouch-test/AVFoundation/AVAudioSinkNodeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,26 @@ void SinkNodeCallbackTest (ManualResetEvent callbackEvent, Func<AVAudioSinkNode>

session.SetCategory (AVAudioSessionCategory.PlayAndRecord, AVAudioSessionCategoryOptions.DefaultToSpeaker, out var categoryError);
Assert.IsNull (categoryError, "Category Error");
#if !__WATCHOS__
session.SetPreferredSampleRate (48000, out var sampleRateError);
Assert.IsNull (sampleRateError, "Sample Rate Error");
session.SetPreferredInputNumberOfChannels (1, out var inputChannelCountError);
Assert.IsNull (inputChannelCountError, "Input Channel Count Error");
#endif // !__WATCHOS__
session.SetActive (true);

Console.WriteLine ($"AVAudioSession: {session}");
Console.WriteLine ($"Mode: {session.Mode}");
#if !__WATCHOS__
Console.WriteLine ($"Preferred Input: {session.PreferredInput}");
#endif // !__WATCHOS__
var availableInputs = session.AvailableInputs;
Console.WriteLine ($"Available Inputs: {availableInputs.Length}");
foreach (var ai in availableInputs)
Console.WriteLine ($" {ai}");
Console.WriteLine ($"Available Categories: {string.Join (", ", session.AvailableCategories)}");
Console.WriteLine ($"Available Modes: {string.Join (", ", session.AvailableModes)}");
#endif
#endif // __MACOS__

using var engine = new AVAudioEngine ();

Expand Down

0 comments on commit 5be9934

Please sign in to comment.