기본 오디오 장치를 변경하기 위해 타일을 만들 수 있나요?

기본 오디오 장치를 변경하기 위해 타일을 만들 수 있나요?

스피커와 헤드폰 사이를 쉽게 전환하고 싶습니다. 이것이 가능한가?

답변1

기본 오디오 장치를 전환하는 방법이 있습니다. 그러나 이에 대해 공개된 API가 없기 때문에 기술에는 대부분 다음과 같은 해킹이 포함됩니다.키를 보내려고 합니다, 이는 그다지 강력하지 않습니다.

API는 하드웨어 비호환성을 방지하기 위해 폐쇄적이고 문서화되지 않은 상태로 유지되므로 제조업체는 브라우저의 기본 홈 페이지처럼 이를 두고 싸우지 않습니다. 그러나 누군가가 성공했습니다.Windows 7의 명령줄에서 오디오 장치 전환, 그리고 댓글에서 WarNov는 이미"Windows 8에서 테스트했습니다. 완벽하게 작동합니다.".

문서화되지 않은 API를 사용하고 있으므로 향후 Windows 버전에서는 중단될 수 있습니다.

Jerry가 이미 언급했듯이 다음을 만들 수 있습니다.타일을 사용한 단축키, C++ 코드를 호출하도록 하세요. .NET에서 사용하려는 경우 다음을 수행할 수도 있습니다.포장지를 사용하다.

코드는 다음과 같이 GitHub에도 게시됩니다.오디오EndPointController, 사용 방법에 대한 이해하기 쉬운 문서 포함:

> EndPointController.exe --help
Lists active audio end-point playback devices or sets default audio end-point
playback device.

USAGE
  EndPointController.exe [-a] [-f format_str]  Lists audio end-point playback
                                               devices that are enabled.
  EndPointController.exe device_index          Sets the default playback device
                                               with the given index.

OPTIONS
  -a             Display all devices, rather than just active devices.
  -f format_str  Outputs the details of each device using the given format
                 string. If this parameter is ommitted the format string
                 defaults to: "Audio Device %d: %ws"

                 Parameters that are passed to the 'printf' function are
                 ordered as follows:
                   - Device index (int)
                   - Device friendly name (wstring)
                   - Device state (int)
                   - Device default? (1 for true 0 for false as int)
                   - Device description (wstring)
                   - Device interface friendly name (wstring)
                   - Device ID (wstring)''

로도 포장되어 있어요PlaybackDevice [ 오디오 출력 스위치 ]

답변2

타일은 배치 파일이나 PowerShell 파일에 대한 바로가기가 될 수 있습니다. 타일을 탭하면 배치 또는 PS 파일이 실행됩니다. 즉, Windows에서 거의 모든 작업을 수행하는 타일을 만들 수 있다는 의미입니다.

CS 기술은 다음과 같습니다.

https://stackoverflow.com/a/2216886/265706

답변으로 표시되지 않은 답변은 Windows 7/8에 대한 솔루션인 것 같습니다.

유감스럽게도 이 특정 API에 대한 것만큼 좋을 수도 있습니다.

단축키 기술은 다음과 같습니다.http://www.howtogeek.com/74331/how-to-create-your-own-windows-8-shortcuts-for-shutdown-perhaps/

아 그런데 Windows RT 장치에는 PowerShell도 있습니다.

관련 정보