-
大小: 158KB文件类型: .zip金币: 2下载: 0 次发布日期: 2021-05-14
- 语言: C#
- 标签: C# .Net CoreAudioApi
资源简介
由于网上都是CoreAudioApi的源码,自己针对CoreAudioApi源码进行的一个简单的封装,方便自己使用
![](http://www.nz998.com/pic/65511.jpg)
代码片段和文件信息
/*
LICENSE
-------
Copyright (C) 2007-2010 Ray Molenkamp
This source code is provided ‘as-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个文件信息
- 上一篇:WPF复制粘贴剪切功能.rar
- 下一篇:基于GDI+的 图元绘制拾取 C#实现
相关资源
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 020ASP.NET车辆综合管理系统.zip
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
- C#自定义控件
- 基于c#的实验室设备管理系统621530
- C# 使用ListView控件实现图片浏览器(源
- C#简单窗体聊天程序
- C#指纹识别系统程序 报告
评论
共有 条评论