-
大小: 158KB文件類型: .zip金幣: 2下載: 0 次發(fā)布日期: 2021-05-14
- 語言: C#
- 標簽: C#??.Net??CoreAudioApi??
資源簡介
由于網(wǎng)上都是CoreAudioApi的源碼,自己針對CoreAudioApi源碼進行的一個簡單的封裝,方便自己使用

代碼片段和文件信息
/*
??LICENSE
??-------
??Copyright?(C)?2007-2010?Ray?Molenkamp
??This?source?code?is?provided?‘a(chǎn)s-is‘?without?any?express?or?implied
??warranty.??In?no?event?will?the?authors?be?held?liable?for?any?damages
??arising?from?the?use?of?this?source?code?or?the?software?it?produces.
??Permission?is?granted?to?anyone?to?use?this?source?code?for?any?purpose
??including?commercial?applications?and?to?alter?it?and?redistribute?it
??freely?subject?to?the?following?restrictions:
??1.?The?origin?of?this?source?code?must?not?be?misrepresented;?you?must?not
?????claim?that?you?wrote?the?original?source?code.??If?you?use?this?source?code
?????in?a?product?an?acknowledgment?in?the?product?documentation?would?be
?????appreciated?but?is?not?required.
??2.?Altered?source?versions?must?be?plainly?marked?as?such?and?must?not?be
?????misrepresented?as?being?the?original?source?code.
??3.?This?notice?may?not?be?removed?or?altered?from?any?source?distribution.
*/
using?System;
using?System.Collections.Generic;
using?System.Text;
using?CoreAudioApi.Interfaces;
using?System.Runtime.InteropServices;
namespace?CoreAudioApi
{
????public?class?AudioEndpointVolume?:?IDisposable
????{
????????private?IAudioEndpointVolume?_AudioEndPointVolume;
????????private?AudioEndpointVolumeChannels?_Channels;
????????private?AudioEndpointVolumeStepInformation?_StepInformation;
????????private?AudioEndPointVolumeVolumeRange?_VolumeRange;
????????private?EEndpointHardwareSupport?_HardwareSupport;
????????private?AudioEndpointVolumeCallback?_CallBack;
????????public??event?AudioEndpointVolumeNotificationDelegate?OnVolumeNotification;
????????public?AudioEndPointVolumeVolumeRange?VolumeRange
????????{
????????????get
????????????{
????????????????return?_VolumeRange;
????????????}
????????}
????????public?EEndpointHardwareSupport?HardwareSupport
????????{
????????????get
????????????{
????????????????return?_HardwareSupport;
????????????}
????????}
????????public?AudioEndpointVolumeStepInformation?StepInformation
????????{
????????????get
????????????{
????????????????return?_StepInformation;
????????????}
????????}
????????public?AudioEndpointVolumeChannels?Channels
????????{
????????????get
????????????{
????????????????return?_Channels;
????????????}
????????}
????????public?float?MasterVolumeLevel
????????{
????????????get
????????????{
????????????????float?result;
????????????????Marshal.ThrowExceptionForHR(_AudioEndPointVolume.GetMasterVolumeLevel(out?result));
????????????????return?result;
????????????}
????????????set
????????????{
????????????????Marshal.ThrowExceptionForHR(_AudioEndPointVolume.SetMasterVolumeLevel(value?Guid.Empty));
????????????}
????????}
????????public?float?MasterVolumeLevelScalar
????????{
????????????get
????????????{
????????????????float?result;
????????????????Marshal.ThrowExceptionForHR(_AudioEndPointVolume.GetMasterVolumeLevelScalar(out?result));
?????????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-01-23?08:31??CoreAudioApi\
?????目錄???????????0??2019-01-23?08:31??CoreAudioApi\.vs\
?????目錄???????????0??2019-01-23?08:31??CoreAudioApi\.vs\CoreAudioApi\
?????目錄???????????0??2019-01-23?08:31??CoreAudioApi\.vs\CoreAudioApi\v14\
?????文件???????36864??2019-01-23?08:31??CoreAudioApi\.vs\CoreAudioApi\v14\.suo
?????目錄???????????0??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\
?????文件????????1003??2019-01-23?08:31??CoreAudioApi\CoreAudioApi.sln
?????文件????????5403??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\AudioEndpointVolume.cs
?????文件????????3335??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\AudioEndpointVolumeCallback.cs
?????文件????????2413??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\AudioEndpointVolumeChannel.cs
?????文件????????2200??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\AudioEndpointVolumeChannels.cs
?????文件????????1189??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\AudioEndpointVolumeNotificationDelegate.cs
?????文件????????1753??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\AudioEndpointVolumeStepInformation.cs
?????文件????????1960??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\AudioEndPointVolumeVolumeRange.cs
?????文件????????2468??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\AudioMeterInformation.cs
?????文件????????2151??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\AudioMeterInformationChannels.cs
?????文件????????5088??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\AudioSessionControl.cs
?????文件????????1626??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\AudioSessionDisconnectReason.cs
?????文件????????1888??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\AudioSessionManager.cs
?????文件????????1278??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\AudioSessionState.cs
?????文件????????2371??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\AudioVolumeNotificationData.cs
?????文件????????2056??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\AUDIO_VOLUME_NOTIFICATION_DATA.cs
?????目錄???????????0??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\bin\
?????目錄???????????0??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\bin\Debug\
?????文件???????25088??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\bin\Debug\CoreAudioApi.dll
?????文件???????77312??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\bin\Debug\CoreAudioApi.pdb
?????目錄???????????0??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\bin\Release\
?????文件???????24064??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\bin\Release\CoreAudioApi.dll
?????文件???????73216??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\bin\Release\CoreAudioApi.pdb
?????文件????????1836??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\Blob.cs
?????文件????????1883??2019-01-23?08:31??CoreAudioApi\CoreAudioApi\CLSCTX.cs
............此處省略52個文件信息
評論
共有 條評論