1
1
// Copyright 2009, Novell, Inc.
2
2
// Copyright 2010, Novell, Inc.
3
// Copyright 2011, 2011 Xamarin Inc
4
5
// Permission is hereby granted, free of charge, to any person obtaining
5
6
// a copy of this software and associated documentation files (the
35
37
return SetActive (beActive, out outError);
38
public bool SetActive (bool beActive, out NSError outError)
42
IntPtr ptrtohandle = (IntPtr) (&errhandle);
44
if (SetActive (beActive, ptrtohandle)){
48
outError = (NSError) Runtime.GetNSObject (errhandle);
55
public bool SetActive (bool beActive, AVAudioSessionFlags flags, out NSError outError)
59
IntPtr ptrtohandle = (IntPtr) (&errhandle);
61
if (_SetActive (beActive, (int) flags, ptrtohandle)){
65
outError = (NSError) Runtime.GetNSObject (errhandle);
71
41
[Obsolete ("Use SetCategory(bool, out NSError) instead")]
72
42
public bool SetCategory (NSString theCategory, NSError outError)
75
45
return SetCategory (theCategory, out outError);
78
public bool SetCategory (NSString theCategory, out NSError outError)
82
IntPtr ptrtohandle = (IntPtr) (&errhandle);
84
if (SetCategory (theCategory, ptrtohandle)){
88
outError = (NSError) Runtime.GetNSObject (errhandle);
94
[Obsolete ("Use SetPreferredHardwareSampleRate(bool, out NSError) instead")]
48
[Obsolete ("Use SetPreferredSampleRate(bool, out NSError) on iOS 6.0 instead")]
95
49
public bool SetPreferredHardwareSampleRate (double sampleRate, NSError outError)
97
51
// Effectively discarded due to original binding error
98
52
return SetPreferredHardwareSampleRate (sampleRate, out outError);
101
public bool SetPreferredHardwareSampleRate (double sampleRate, out NSError outError)
105
IntPtr ptrtohandle = (IntPtr) (&errhandle);
107
if (SetPreferredHardwareSampleRate (sampleRate, ptrtohandle)){
111
outError = (NSError) Runtime.GetNSObject (errhandle);
117
55
[Obsolete ("Use SetPreferredIOBufferDuration(bool, out NSError) instead")]
118
56
public bool SetPreferredIOBufferDuration (double duration, NSError outError)
120
58
// Effectively discarded due to original binding error
121
59
return SetPreferredIOBufferDuration (duration, out outError);
124
public bool SetPreferredIOBufferDuration (double duration, out NSError outError)
128
IntPtr ptrtohandle = (IntPtr) (&errhandle);
130
if (SetPreferredIOBufferDuration (duration, ptrtohandle)){
134
outError = (NSError) Runtime.GetNSObject (errhandle);