Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An option to detect songs playing through headphones or speakers #39

Open
azumukupoe opened this issue Feb 25, 2024 · 1 comment
Open

Comments

@azumukupoe
Copy link

It seems that songs are only recognized through microphone input

@AlekseyMartynov
Copy link
Owner

Hello,

The app uses the default recording device selected in the OS mixer.

On Windows, try one of the following:

  • Stereo Mix device

  • VB-CABLE Virtual Audio Device

  • WASAPI loopback mode
    The app should be recompiled with the following changes in Project.csproj

         <StartupObject>Project.Program</StartupObject>
    -    <DefineConstants>$(DefineConstants);NO_WASAPI_CAPTURE</DefineConstants>
    +    <DefineConstants>$(DefineConstants);WASAPI_CAPTURE</DefineConstants>
         <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
       </PropertyGroup>
     
       <PropertyGroup Condition="'$(Configuration)' == 'Release'">
    -    <PublishAot>true</PublishAot>
    +    <PublishSingleFile>true</PublishSingleFile>
    +    <PublishTrimmed>true</PublishTrimmed>
    +    <BuiltInComInteropSupport>true</BuiltInComInteropSupport>
         <DebuggerSupport>false</DebuggerSupport>
         <InvariantGlobalization>true</InvariantGlobalization>
         <UseSystemResourceKeys>true</UseSystemResourceKeys>
         <IlcDisableReflection>true</IlcDisableReflection>
    -    <TargetName>$(AssemblyName).$(RuntimeIdentifier)</TargetName>
         <StripSymbols>true</StripSymbols>
       </PropertyGroup>
    
    +  <ItemGroup>
    +    <TrimmerRootAssembly Include="NAudio.Wasapi" />
    +  </ItemGroup>

    or try this binary: Shazam-WASAPI.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants