nyancat.cs icon indicating copy to clipboard operation
nyancat.cs copied to clipboard

Can we get a parameter --soundon?

Open paule96 opened this issue 5 years ago • 7 comments

It would be create if we have a --soundon Parameter to Play the Sound file to the nyancat like:

https://www.youtube.com/watch?v=QH2-TGUlwu4

Have fun :) 🐱

paule96 avatar Aug 29 '18 08:08 paule96

Nice idea but the name sounds kind of confusing. In my opinion --withsound sounds a bit more useful.

abeckDev avatar Aug 29 '18 08:08 abeckDev

Thanks for your suggestion, should be interesting to implement. 😄 .

Not sure about the parameter name though. Might go with --with-sound or maybe just --sound. Not really sure yet 🤔 .

vandycknick avatar Aug 30 '18 14:08 vandycknick

I think --sound sounds good. But how we implement this? 😄 I don't know if there a multiplattform implementation of beep out there for dotnet core 😄

paule96 avatar Aug 30 '18 17:08 paule96

this is what we look for:

https://docs.microsoft.com/en-us/dotnet/api/system.console.beep?view=netcore-2.1#System_Console_Beep_System_Int32_System_Int32_

paule96 avatar Aug 30 '18 18:08 paule96

Anybody know the melody of Nyanyanyanyanyanyanyan?

paule96 avatar Aug 30 '18 18:08 paule96

Fuuuu…. The System.Beep funtion only supports windows :(

paule96 avatar Sep 01 '18 23:09 paule96

I added an initial rough implementation for a --sound parameter in this commit https://github.com/nickvdyck/nyancat.cs/commit/89f17eb204a401275652a8f313824a3edb300f43 . It's windows only at the moment. I haven't found a native api on linux and mac yet (to be fair I also haven't looked). But I don't want to bring in some large dependency just to play some sound. So if I can't find a fairly sensible linux and mac api I'm going to leave this as is for now.

vandycknick avatar Oct 09 '18 14:10 vandycknick