Bay 12 Games Forum

Dwarf Fortress => DF Modding => Utilities and 3rd Party Applications => Topic started by: Algorithman on July 22, 2016, 02:22:35 pm

Title: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on July 22, 2016, 02:22:35 pm
Hello fellow beer drinkin', axe wieldin' dwarves.

Let me present you a c# port of SoundSense.
SoundCenSe v1.4.3
Now for Win32, Linux and soon also for OSX!

Spoiler: Screenshot Windows (click to show/hide)


Spoiler: Screenshot OSX (click to show/hide)

It's a tight port, using the existing sound pack files/xml's, but with some enhancements.

Enhancements:

Release notes:

System requirements:

Windows:
If SoundCenSe doesn't seem to start (nothing happens when you open it), check the Log.txt file, there the url's will be provided too.
After installing gtk-sharp, a reboot might be needed even the installer doesn't tell you so.

Linux: (Debian)


Installation is quite easy:

* Only needed at first start or when you want to update, linux users might need to change the Configuration.json file, setting gamelogPath to "", then try again. I'll fix this in the next version, promised!

If you find any bugs or have any ideas how i can make it better, please do not hesitate to tell me :)


Credits: Thanks Zwei, for your formidable work on SoundSense
FMOD for their audio library

And as always: Have fun!



PS: Latest version (1.4.3) should fix the problems with Win10 crashes

 
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Meph on July 23, 2016, 08:07:45 am
For the uninitiated, could you explain is simple words how this is different from the normal soundsense and what makes it better?
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on July 23, 2016, 08:40:31 am
I edited the first post to emphasize the enhancements.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: milo christiansen on July 23, 2016, 11:02:09 am
Those are some pretty rockin enhancements, particularly the "no Java" part :)

Being able to tone down rain noise will be a huge plus, as it gets annoying really fast.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on July 24, 2016, 07:27:27 am
Updated to v1.2 because of a fixed memory leak.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: lethosor on July 24, 2016, 03:28:06 pm
Those are some pretty rockin enhancements, particularly the "no Java" part :)
Yeah, but the downside to that is the Windows-only part.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: SatelliteOfLove on July 24, 2016, 08:48:25 pm
Those are some pretty rockin enhancements, particularly the "no Java" part :)
Yeah, but the downside to that is the Windows-only part.

Algorithman, how heavily does this depend on Windows-only components?  Do you have any idea how much work would be required to get this running on Mono?
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: lethosor on July 24, 2016, 11:17:18 pm
I've had pretty bad luck with Mono in the past. But who knows, maybe it's improved.

To be fair, I really don't care for Java either, but it's hard to find a similarly portable solution, let alone one that doesn't require access to every platform to build on.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on July 24, 2016, 11:41:05 pm
Hi SatelliteOfLove and lethosor

as for windows dependency:

1. its a winforms, should be able to get this to GTK without much problems (didn't do much with GTK lately, so i just assume its gotten better ^^)
2. I did the threading with Task.Parallel. I do not know if mono supports that, but that also should be doable to port to normal threading model.(I only use Task.Factory.StartNew)
3. The audio library, the biggest problem: NAudio relies on windows dll's. I would need to find a replacement lib which supports sample output, sample mixing, sample volume change, mp3 and ogg file readers. There might be a way, i'm reading into http://www.ambiera.com/irrklang/ (http://www.ambiera.com/irrklang/) atm, looks very promising.
4. Method of disovery where DF runs. Probably have to do it via configuration only.

So overall it should be doable.

Another thing is to figure out if i can do it in one solution/repo or if i have to maintain two different ones.
But that's only how to organize things.


edit: good news, gtk# has no dependency to mono, i'm going to work this evening :)
edit2: better news, mono has winforms compatibility (something went by me unnoticed...)
 
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on July 25, 2016, 12:06:12 am
Another thing:

I do log messages which have no representation yet in the sounds xmls.
In another thread there is talk about DFHack output which is not yet processed.
In the next few days i will put up either a mail addy or a page where the 'missing.txt' can be posted. Since i normally only play fortress mode, i do not yet know if something is missing in adventure mode.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on July 25, 2016, 12:22:54 pm
Wow, harder than i thought to find a c# wrapped audio library which works cross platform. There are a few candidates, but none did strike me as usable yet. But i'm hanging on.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Bumber on July 25, 2016, 02:03:57 pm
To be fair, I really don't care for Java either, but it's hard to find a similarly portable solution, let alone one that doesn't require access to every platform to build on.
Python?
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: milo christiansen on July 25, 2016, 03:16:39 pm
No! No Python!

Python has one HUGE problem, it's really slow. Anyone who uses Python for developing "real" applications is asking for performance trouble down the line.

.NET and JVM are OK (but not the best) because they use JIT native compilation or similar to get almost native speeds, but Python just uses a straight VM with all the performance problems that implies.

If you can't compile to native code, you have way too much overhead for large apps. The worst part is that the slow kinda sneaks up on you, and by the time you realize it's too slow it is too late to change.

Most Python apps have the most performance critical parts written in C (although most Python programmers just use the libraries and never realize this), if it was all Python it would never be fast enough.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Maltavius on July 25, 2016, 03:34:07 pm
No! No Python!

Python has one HUGE problem, it's really slow. Anyone who uses Python for developing "real" applications is asking for performance trouble down the line.

.NET and JVM are OK (but not the best) because they use JIT native compilation or similar to get almost native speeds, but Python just uses a straight VM with all the performance problems that implies.

If you can't compile to native code, you have way too much overhead for large apps. The worst part is that the slow kinda sneaks up on you, and by the time you realize it's too slow it is too late to change.

Most Python apps have the most performance critical parts written in C (although most Python programmers just use the libraries and never realize this), if it was all Python it would never be fast enough.
SoundSense isn't that demanding nor critical.

Title: Re: SoundCenSe, a c# port of SoundSense
Post by: milo christiansen on July 25, 2016, 03:40:52 pm
Yes, that's what everyone says just before their app slows down...
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Pvt. Pirate on July 26, 2016, 02:36:37 am
if .net4.5.1 is only available for win7/8/10, it would not work for me either.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on July 26, 2016, 05:47:14 am
Hi Pirate,

you left out a vital information: Which version can you use?

Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Pvt. Pirate on July 26, 2016, 07:57:49 am
latest version my OS can install is ".net framework 4"
i hope SounCense doesn't use any functions that aren't included in that version yet.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on July 27, 2016, 04:47:48 am
No, Net4 is perfectly fine. I can probably go lower too. And i decided on the audio library.

SDL2 + SDL2_mixer

Should work perfectly, its already cross platform, reads mp3, ogg and much more, supports channels with callbacks.
Maybe i can finish this weekend.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Nopenope on July 28, 2016, 05:45:36 pm
No! No Python!

Python has one HUGE problem, it's really slow. Anyone who uses Python for developing "real" applications is asking for performance trouble down the line.

.NET and JVM are OK (but not the best) because they use JIT native compilation or similar to get almost native speeds, but Python just uses a straight VM with all the performance problems that implies.

If you can't compile to native code, you have way too much overhead for large apps. The worst part is that the slow kinda sneaks up on you, and by the time you realize it's too slow it is too late to change.

Most Python apps have the most performance critical parts written in C (although most Python programmers just use the libraries and never realize this), if it was all Python it would never be fast enough.

Unless you're working with critical, embedded systems the speed difference doesn't matter in most cases. Parsing gamelog.txt output to produce the appropriate sound effect shouldn't be an exception.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: DeDeRon on July 29, 2016, 04:01:09 am
To be fair, I really don't care for Java either, but it's hard to find a similarly portable solution, let alone one that doesn't require access to every platform to build on.
Try Go (http://golang.org/).
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: lethosor on July 29, 2016, 06:36:48 am
Yeah, I know about Go. I was thinking of a native UI, which, from what I remember, is still a work in progress. I guess a web UI could work (there's a legends viewer that uses that strategy), but I imagine it would take extra effort to shut down the server automatically, if people want to do that.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: milo christiansen on July 29, 2016, 12:29:12 pm
I use Go all the time, but one thing it lack is good UI libraries. The only UI packages are half-assed bindings to C libraries.

Web UIs work so-so (I use one for Rubble, which is written in Go), but they simply are not as good as native. Stick with C# for UI work (just use mono for Linux and OSX).
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: lethosor on July 29, 2016, 01:58:41 pm
Like I said, I haven't gotten Mono to work well at all in the past, let alone with GUI applications.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on July 29, 2016, 02:42:57 pm
Even debian runs mono gui's just fine (jessie with mono 3.2.8). What platform are you on, lethosor?

But debian has another flaw. SDL2_mixer relies on the smpeg2 library, which is (yes you guessed right) not included at all in debian so far.
And SDL 1.2 does mp3's only as music (only one music at a time) and cannot load it as sound chunks.
At the moment i'm even going so far as to think of a c# mp3 decoder implementation, but that sucks up too much cpu (on my computer around 2.5%/channel, mixing not included).

Title: Re: SoundCenSe, a c# port of SoundSense
Post by: lethosor on July 29, 2016, 02:52:45 pm
I had trouble getting Mono to build GUI applications on OS X and Ubuntu (I didn't get to the "running" stage). That could've been due to them using something which Mono didn't support or only partially supported (e.g. WinForms?).
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on July 29, 2016, 03:07:15 pm
Maybe the program you tried used VisualStyles (which are currently not supported). Standard win32 theme should work. (See http://www.mono-project.com/docs/gui/winforms/ (http://www.mono-project.com/docs/gui/winforms/))
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: milo christiansen on July 29, 2016, 03:07:32 pm
Mono didn't support WinForms for a long time, but it does now I think.

At the moment i'm even going so far as to think of a c# mp3 decoder implementation, but that sucks up too much cpu (on my computer around 2.5%/channel, mixing not included).

How hard is it to call into C code with C#? If not too hard you could use a game audio library (DF itself uses FMod I think, so if you used that you could use the same SO/DLL and not need to ship as much stuff).
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on July 29, 2016, 03:13:10 pm
Actually i'm just trying FMOD just now :)

Update: Fmod works on debian quite well, now on to the real stuff
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on July 30, 2016, 02:58:38 pm
FMOD conversion is quite done now.

I'm currently looking for someone who is willing to try it on OSX, i can provide the FMOD binaries (dunno if i am allowed to share them without the project itself, EULA's are really not my thing  :D)

New Release 1.2.4 is up (links in first post)
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: jecowa on July 30, 2016, 03:49:02 pm
I'm not a lawyer, but according to their Wikipedia article, they have a non-commercial license that allows for redistribution as long as you're not making money off of it.

I'd like to test it out on OS X. I guess I just need Dwarf Fortress v0.43.03 with DFHack release 1, right?
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on July 30, 2016, 03:53:05 pm
Actually any DF version should work, since i only read the gamelog.

I know of the non-commercial license, but for the libs alone? Lawyers have weird ways of thinking :)

I'll pm you the link.

edit: Sent and thanks
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Maltavius on August 04, 2016, 05:28:40 am
I just downloaded the latest release.

I put it in c:\users\username\Downloads\SoundCenSe folder.
I moved over the soundsense packs folder and started SoundCenSe and pressed update:

Update finished.

I start Dwarf Fortress from D:\Games\DwarfFortress\Ironhand\Dwarf Fortress.exe

No sound... I thought this would find the gamelog on it's own?

Looking through Configuration.json gamelogPath is =   "gamelogPath": "D:\\DF 0.43.03\\Dwarf Fortress 0.43.03\\gamelog.txt",

I guess that's on your system?
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Maltavius on August 04, 2016, 05:31:41 am
Changing the path doesn't seem to do anything. When I set the path with only single \ the program doesn't even start.

Log file says this.
2016-07-30 22:15:16.4623|WARN|SoundCenSe.Configuration.Sounds.SoundsXML|Include listing tag without valid 'filePathAndName' attribute encountered (make sure it ends in '.xml'!).
2016-07-30 22:15:16.8004|WARN|SoundCenSe.Configuration.Sounds.SoundsXML|Include listing tag without valid 'filePathAndName' attribute encountered (make sure it ends in '.xml'!).
2016-07-30 22:16:22.3722|WARN|SoundCenSe.Configuration.Sounds.SoundsXML|Include listing tag without valid 'filePathAndName' attribute encountered (make sure it ends in '.xml'!).
2016-07-30 22:16:22.6787|WARN|SoundCenSe.Configuration.Sounds.SoundsXML|Include listing tag without valid 'filePathAndName' attribute encountered (make sure it ends in '.xml'!).
2016-07-30 22:17:16.6116|WARN|SoundCenSe.Configuration.Sounds.SoundsXML|Include listing tag without valid 'filePathAndName' attribute encountered (make sure it ends in '.xml'!).
2016-07-30 22:17:17.0562|WARN|SoundCenSe.Configuration.Sounds.SoundsXML|Include listing tag without valid 'filePathAndName' attribute encountered (make sure it ends in '.xml'!).
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: jecowa on August 04, 2016, 05:38:20 am
Looking through Configuration.json gamelogPath is =   "gamelogPath": "D:\\DF 0.43.03\\Dwarf Fortress 0.43.03\\gamelog.txt",

I think you're supposed to use that file to tell it where your gamelog is located.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: lethosor on August 04, 2016, 06:40:23 am
Why would "0.43.03" be in the path twice, then? (And why would it be in the D drive?)
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Pvt. Pirate on August 04, 2016, 09:21:40 am
Why would "0.43.03" be in the path twice, then? (And why would it be in the D drive?)
i use the LNP and it's on my "I:\" ¯\_(ツ)_/¯
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on August 04, 2016, 12:18:27 pm
oh sry, thats where my DF testing grounds are. Config keeps track of the DF path last played.

And it should find the process on its own, yes. I check for the process name "Dwarf Fortress", get path and use it to look for gamelog.txt.
Which version did you try it with, Maltavius? Did the red circle turn green (right lower corner of the window)?

Did you try the Winforms or the GTK version (developer branch)?
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on August 04, 2016, 04:25:57 pm
The GTK version is nearly done, just a few tweaks to get in for the auto-detection on *nix and some optimizing.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: jecowa on August 04, 2016, 05:40:10 pm
Will users be required to install Mono SRE or something to run the release version of SoundCenSe??
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on August 04, 2016, 05:53:00 pm
Dont think so. there is no dynamic code creation involved. Normal mono installation should be enough.

The showstopper now is to get the path to the gamelog. Since Process.MainModule isnt really working on unix...
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: jecowa on August 04, 2016, 06:48:30 pm
I guess you already know that SoundSense directs used to install it into the Dwarf Fortress folder and then the config file is set to look in the parent directory by default. That works fine for me.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Maltavius on August 05, 2016, 04:03:50 am
oh sry, thats where my DF testing grounds are. Config keeps track of the DF path last played.

And it should find the process on its own, yes. I check for the process name "Dwarf Fortress", get path and use it to look for gamelog.txt.
Which version did you try it with, Maltavius? Did the red circle turn green (right lower corner of the window)?

Did you try the Winforms or the GTK version (developer branch)?

My correct path is this:
"D:\Spel\Dwarf Fortress\Ironhand_43_05A\Dwarf Fortress\Dwarf Fortress.exe"

I'ts 0.43.05

I'm on Windows 10
I downloaded "SoundCenSe v1.2.4 Win32.zip" from https://github.com/Algorithman/SoundCenSe/releases

The Red circle never turned green.

Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on August 05, 2016, 04:48:03 am
Hmm, Win10. Don't have it, probably never will.
On win7 it never failed me to get the location of the gamelog. Maybe some security settings in win10 prevent other processes to check their location. Maybe i'll find something.

Meanwhile, i'll get the GTK version for linux and osx online this weekend.

 
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: PeridexisErrant on August 05, 2016, 07:31:06 am
Watching with interest :D

It looks like something strange is happening with your binaries on the release page - can you simply add them to the release instead of manually linking to a version in the /files/ space?  That way they're discoverable via the GH API...

I'd also be excited for a configuration option "soundpack location", so people using this and classic Soundsense could share the many megabytes of audio files.

With those, I'd put it in my pack... if you're OK with that  ;)
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Maltavius on August 05, 2016, 10:10:41 am
Hmm, Win10. Don't have it, probably never will.
On win7 it never failed me to get the location of the gamelog. Maybe some security settings in win10 prevent other processes to check their location. Maybe i'll find something.

Meanwhile, i'll get the GTK version for linux and osx online this weekend.

Well that makes SoundCenSe non-usable for me. Since I can't specify the path and make it work either.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on August 05, 2016, 10:20:34 am
Give me a little time :) Nobody prevents me from adding a second discover mode  :D
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on August 05, 2016, 10:24:51 am
Watching with interest :D

It looks like something strange is happening with your binaries on the release page - can you simply add them to the release instead of manually linking to a version in the /files/ space?  That way they're discoverable via the GH API...

Hmm, pls explain. I just clicked on Draft new release, packed the files in a zip and uploaded them. Is there another way to do this properly?
Nevermind, found it. How could i not see it :)

I'd also be excited for a configuration option "soundpack location", so people using this and classic Soundsense could share the many megabytes of audio files.

With those, I'd put it in my pack... if you're OK with that  ;)

Soundpack location option will be in there of course. And like i told Maltavius, i probably add a second mode of DF gamelog access.
Put it in, just let me give it the finishing touches first :)
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: PeridexisErrant on August 13, 2016, 12:40:35 am
Added to my pack for the next release :D

In the process, I noticed that Configuration.json has a field "expectedMinimalSoundsCound" which should probably end with a "t" :P
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Maltavius on August 13, 2016, 09:51:20 am
Added to my pack for the next release :D

In the process, I noticed that Configuration.json has a field "expectedMinimalSoundsCound" which should probably end with a "t" :P

I hope you include GTK# as well then?

Since there are no links provided on the release page I googled for the programs required.
.NET4.0 is already a part of Windows 10 so that I can't install.
Microsoft Visual C++ 2013 redistributables I already have
gtk-sharp 2.12.38 I found on https://chocolatey.org/packages/gtksharp but I can't figure out how to install it, the commands on that page doesn't work.

I did find a .msi for gtk-sharp-2.12.9-2 but installing that doesn't seem to help either.

When I run SoundCenSeGTK.exe nothing happens

Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on August 13, 2016, 10:37:54 am
Right now i'm at writing readme, providing links etc.
It's the top point on my todo list :)

Quick answer: you might also miss the MS Visual c++ runtime redistributables 2013
(https://download.microsoft.com/download/3/8/7/387A0F10-C0C1-4C74-82A9-4BB741342366/vcredist_x86.exe (https://download.microsoft.com/download/3/8/7/387A0F10-C0C1-4C74-82A9-4BB741342366/vcredist_x86.exe))
and gtk# might need a reboot too (but thats not confirmed)
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Maltavius on August 13, 2016, 11:46:24 am
Right now i'm at writing readme, providing links etc.
It's the top point on my todo list :)

Quick answer: you might also miss the MS Visual c++ runtime redistributables 2013
(https://download.microsoft.com/download/3/8/7/387A0F10-C0C1-4C74-82A9-4BB741342366/vcredist_x86.exe (https://download.microsoft.com/download/3/8/7/387A0F10-C0C1-4C74-82A9-4BB741342366/vcredist_x86.exe))
and gtk# might need a reboot too (but thats not confirmed)

That one is in german?
How was this easier than Java? :P

Reboot solved it

Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on August 13, 2016, 12:04:33 pm
oh i tagged the german version? damn, need to redo the binaries and readme again, lol
glad it works now :)
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on August 13, 2016, 04:49:25 pm
Updated to v1.4.1


Title: Re: SoundCenSe, a c# port of SoundSense
Post by: YuZheng on August 27, 2016, 06:25:27 pm
FYI: I just tried the program out. It runs ok for me, but unfortunately I can't really use it. I have a 3200x1800 screen resolution with scaling on Windows 10, and the program's UI doesn't work with it.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: lethosor on August 28, 2016, 08:17:07 am
A screenshot might be helpful so others can see what the problem is.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on August 30, 2016, 06:15:59 am
Hi YuZheng

there seems to be an issue with scaling and gtk+ (see for pidgin: https://pidgin.im/pipermail/support/2016-January/029256.html (https://pidgin.im/pipermail/support/2016-January/029256.html))

Not much i can do atm, since i don't have Win10 (*cough* *spyware* *cough*) but i try to reproduce it by manually setting the dpi. Maybe there is a way around this problem. Maybe the gtkrc file can be adjusted to address this problem.

(a screenshot would be nice tho :)))
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Maltavius on August 31, 2016, 03:01:33 am
FYI: I just tried the program out. It runs ok for me, but unfortunately I can't really use it. I have a 3200x1800 screen resolution with scaling on Windows 10, and the program's UI doesn't work with it.

Scaling isn't even supported correctly for all Windows applications. You're better off just changing the text-size to get larger windows/buttons.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Heretic on October 24, 2016, 06:24:47 am
That about win x64 as we had dfhack updated?
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Maltavius on November 10, 2016, 09:43:07 am
That about win x64 as we had dfhack updated?
This is unaffected since it just reads the gamelog.txt file.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Pvt. Pirate on November 11, 2016, 05:17:56 am
FYI: I just tried the program out. It runs ok for me, but unfortunately I can't really use it. I have a 3200x1800 screen resolution with scaling on Windows 10, and the program's UI doesn't work with it.

Scaling isn't even supported correctly for all Windows applications. You're better off just changing the text-size to get larger windows/buttons.
one more reason not to go for anything past Win7 :D
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Maltavius on January 03, 2017, 01:39:02 am
FYI: I just tried the program out. It runs ok for me, but unfortunately I can't really use it. I have a 3200x1800 screen resolution with scaling on Windows 10, and the program's UI doesn't work with it.

Scaling isn't even supported correctly for all Windows applications. You're better off just changing the text-size to get larger windows/buttons.
one more reason not to go for anything past Win7 :D

Scaling isn't supported for Windows 7 either, it has never been supported by Microsoft.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Maltavius on January 19, 2017, 03:49:28 am
Eh, It's a bit hard to control the volume in SoundCenSe since the icon covers the controls...

https://drive.google.com/file/d/0B8haRmkqjRHkbEhXNkZ4NkEwR3c/view?usp=sharing
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: lethosor on January 19, 2017, 10:43:12 am
Eh, It's a bit hard to control the volume in SoundCenSe since the icon covers the controls...

https://drive.google.com/open?id=0B8haRmkqjRHkbEhXNkZ4NkEwR3c
Whatever that links to, it isn't publicly-visible.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Maltavius on January 20, 2017, 03:32:19 am
Eh, It's a bit hard to control the volume in SoundCenSe since the icon covers the controls...

https://drive.google.com/open?id=0B8haRmkqjRHkbEhXNkZ4NkEwR3c
Whatever that links to, it isn't publicly-visible.

About 7 minutes after you tried to access the Image I gave you access.

And it should be a public link by now
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on January 20, 2017, 12:39:42 pm
Wow, i never thought someone could override the size of the icon in the audio mixer...
Seems to me like its a bug in the windows mixer. I only provided the icon.

Which windows version do you use?
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Maltavius on January 28, 2017, 05:13:07 pm
Wow, i never thought someone could override the size of the icon in the audio mixer...
Seems to me like its a bug in the windows mixer. I only provided the icon.

Which windows version do you use?

Neither did I, but this app is the only one that has this problem.
I'm on Windows 10 Home 64-bit
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: zwei on February 03, 2017, 02:34:48 pm
Hey, good great job at doing port and keeping compatibility with existing sound format!

If you want, you can call it "SoundSense 2", I would not mind!
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: BloodLines on February 11, 2017, 09:28:07 pm
Confirmed working on Arch Linux 64 bit, just needed to install the 2 packages (pacman -S mono gtk-sharp-2) and it worked like a charm. Works a bit better than soundsense and fixes a few issues I was having related to it.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on February 14, 2017, 02:17:07 pm
@Zwei thanks for the suggestion, i'll consider it for the next version (though it will take a while, since i'm working on my own game for now)

@BloodLines nice to hear it works on arch :)

Title: Re: SoundCenSe, a c# port of SoundSense
Post by: PeridexisErrant on March 14, 2017, 07:56:47 am
Hi Algorithman - what's the status of OSX and Linux support?  It says supported in the OP, but the latest release only has a windows build...
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: sparkybear on May 28, 2017, 12:40:26 am
This breaks audio on Windows 10, as in, audio does not play through any other applications while it is open.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Moonshine Fox on June 08, 2017, 01:35:18 am
a) Great idea to expand on a great program

b) annoying to make it Windows only.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Bumber on June 09, 2017, 03:38:44 am
b) annoying to make it Windows only.
Odd thing to say when the OP states the exact opposite.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Moonshine Fox on June 09, 2017, 03:50:50 am
b) annoying to make it Windows only.
Odd thing to say when the OP states the exact opposite.

Welp, I'm stuck in the old days when C# didn't run on Linux. My b.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: lethosor on June 09, 2017, 08:33:05 am
b) annoying to make it Windows only.
Odd thing to say when the OP states the exact opposite.
I've found that a lot of C# things that claim to work on non-Windows actually don't, although that may have improved since I last tried. On the other hand, there are screenshots of this running on OS X and Linux in the first post, so that's promising, but no OS X instructions or builds that I could find.

Moonshine Fox: it's a bit buried, but there's a Linux build on GitHub at the releases link (https://github.com/Algorithman/SoundCenSe/releases) from the first post, under 1.3-RC2 (https://github.com/Algorithman/SoundCenSe/releases/tag/1.3-RC2).
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: HammerHand on June 10, 2017, 04:57:45 pm
Don't mind me, just posting to watch. :)
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Moonshine Fox on June 15, 2017, 07:21:22 am
Once I get back from my trip, I'll give this a whirl. I'm on 64 bit ArchLinux. So we'll see whatever bugs I can dig up.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Moonshine Fox on June 25, 2017, 07:12:45 am
Well, no matter what I try, MonoDevelop ends up crashing trying to open any solution files, so I've been unsuccessful in compiling this on my system. Back to regular SoundSense for me.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on June 25, 2017, 08:15:06 am

Sorry for the long absence, my irl workload is a bit higher than usual :)

Hmm, thats odd, just tried and works fine.

Code: [Select]
XBuild Engine Version 14.0
Mono, Version 4.6.2.0
Copyright (C) 2005-2013 Various Mono authors

Build started 25.06.2017 15:13:30.
__________________________________________________
Project "/home/chris/test/SoundCenSe/SoundCenSe GTK/SoundCenSeGTK.sln" (default target(s)):
Target ValidateSolutionConfiguration:
Building solution configuration "Debug|x86".
Target Build:
Project "/home/chris/test/SoundCenSe/SoundCenSe GTK/Misc/Misc.csproj" (default target(s)):
Target PrepareForBuild:
Configuration: Debug Platform: AnyCPU
Target GenerateSatelliteAssemblies:
No input files were specified for target GenerateSatelliteAssemblies, skipping.
Target _GenerateTargetFrameworkMonikerAttribute:
Skipping target "_GenerateTargetFrameworkMonikerAttribute" because its outputs are up-to-date.
Target CoreCompile:
Skipping target "CoreCompile" because its outputs are up-to-date.
Done building project "/home/chris/test/SoundCenSe/SoundCenSe GTK/Misc/Misc.csproj".
Project "/home/chris/test/SoundCenSe/SoundCenSe GTK/SoundCenSeGUI/SoundCenSeGUI.csproj" (default target(s)):
Target PrepareForBuild:
Configuration: Debug Platform: AnyCPU
Target GenerateSatelliteAssemblies:
No input files were specified for target GenerateSatelliteAssemblies, skipping.
Target _GenerateTargetFrameworkMonikerAttribute:
Skipping target "_GenerateTargetFrameworkMonikerAttribute" because its outputs are up-to-date.
Target CoreCompile:
Skipping target "CoreCompile" because its outputs are up-to-date.
Done building project "/home/chris/test/SoundCenSe/SoundCenSe GTK/SoundCenSeGUI/SoundCenSeGUI.csproj".
Project "/home/chris/test/SoundCenSe/SoundCenSe GTK/SoundCenSeGTK/SoundCenSeGTK.csproj" (default target(s)):
Target PrepareForBuild:
Configuration: Debug Platform: x86
Target GenerateSatelliteAssemblies:
No input files were specified for target GenerateSatelliteAssemblies, skipping.
Target _GenerateTargetFrameworkMonikerAttribute:
Skipping target "_GenerateTargetFrameworkMonikerAttribute" because its outputs are up-to-date.
Target CoreCompile:
Skipping target "CoreCompile" because its outputs are up-to-date.
Target _CopyDeployFilesToOutputDirectoryPreserveNewest:
Skipping target "_CopyDeployFilesToOutputDirectoryPreserveNewest" because its outputs are up-to-date.
Done building project "/home/chris/test/SoundCenSe/SoundCenSe GTK/SoundCenSeGTK/SoundCenSeGTK.csproj".
Done building project "/home/chris/test/SoundCenSe/SoundCenSe GTK/SoundCenSeGTK.sln".

Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:00.7298700

Tried on Debian Stretch with monodevelop 5.10 and
XBuild Engine Version 14.0
Mono, Version 4.6.2.0
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Moonshine Fox on July 02, 2017, 04:13:25 am
Apparently I'm missing NLog and Newtonsoft-Json, that's why it's failing. Not sure where I can find those dependencies for Arch, but I'll have a look.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on July 02, 2017, 03:38:39 pm
They're nuget packages, monodevelop with mrward's nuget addin (https://github.com/mrward/monodevelop-nuget-addin (https://github.com/mrward/monodevelop-nuget-addin)) should do the trick.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Maltavius on July 05, 2017, 10:15:08 am
Does it work with .NET Core for Linux?

https://www.microsoft.com/net/download/linux

Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on July 07, 2017, 11:11:55 am
It might, didn't try it yet.
The source code should compile fine, only thing would be the project file. Dunno if NetCore does use the same csproj file structure.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on July 08, 2017, 02:48:20 pm
New Version specially for Win10 users:

https://github.com/Algorithman/SoundCenSe/releases/tag/1.4.4

Thx to thmsndk i wouldnt have found the thread concurrency (which did never hit me on Win7).

This should prevent the frequent crashes you might have experienced.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: BlackSmokeDMax on July 24, 2017, 10:26:12 pm
Hi, don't seem to get any sound while running the utility. Going through the thread, it seems like it should be showing up in my windows volume mixer as well, and not seeing it.

Here is my log.txt output:

Code: [Select]
2017-07-24 18:30:13.1267|WARN|SoundCenSeGTK.MainClass|Checking dll in registry
2017-07-24 18:30:13.6815|WARN|SoundCenSeGTK.SoundsXML|Include listing tag without valid 'filePathAndName' attribute encountered (make sure it ends in '.xml'!).
2017-07-24 18:34:06.5788|ERROR|SoundCenSeGTK.PackDownloader|File http://df.zweistein.cz/soundsense/soundpack/autoUpdater.xml had wrong checksum (45328223b0bc4983941a7eef45e6721821a0207c<->b67a8d1a88a896bf3d1677d41037f17fa08e8170
2017-07-24 22:06:20.6350|WARN|SoundCenSeGTK.MainClass|Checking dll in registry
2017-07-24 22:06:22.5759|WARN|SoundCenSeGTK.SoundsXML|Include listing tag without valid 'filePathAndName' attribute encountered (make sure it ends in '.xml'!).
2017-07-24 22:13:23.2266|ERROR|SoundCenSeGTK.PackDownloader|File http://df.zweistein.cz/soundsense/soundpack/autoUpdater.xml had wrong checksum (45328223b0bc4983941a7eef45e6721821a0207c<->b67a8d1a88a896bf3d1677d41037f17fa08e8170
2017-07-24 22:13:36.7621|WARN|SoundCenSeGTK.MainClass|Checking dll in registry
2017-07-24 22:13:38.0461|WARN|SoundCenSeGTK.SoundsXML|Include listing tag without valid 'filePathAndName' attribute encountered (make sure it ends in '.xml'!).

I am using the version included with PE's LNP 0.43.05r07 - I am also having the same problem on another computer using the version included with version 0.43.05r08.

I have tried with the sound setting in the LNP at both the Sound:No and Sound:YES setting. (Another question... which is correct, I assume Sound:NO because that is the built in sound from DF)

Btw, I do have:
  .Net 4 installed
  Gtk-sharp installed (via link in original post)
  I seem to have a bunch of Visual C++ runtime installed (looking in controlpanel/uninstallprogram list) - do I need to install the one linked in original post as well? is that a special one?


Any help would be appreciated.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on July 25, 2017, 12:34:08 am
Hi blacksmokedmax,

Is the colored icon in the lower right hand corner of the window red or green? If it's red then soundcense didn't know where to find df. Check the settings tab and turn off the automatic detect option. Then you'll be able to set the path manually.

Pls let me know if you still have problems.

As for the auto detection I'll look into it later tonight. It might be broken.

Title: Re: SoundCenSe, a c# port of SoundSense
Post by: BlackSmokeDMax on July 25, 2017, 02:26:22 am
Hi blacksmokedmax,

Is the colored icon in the lower right hand corner of the window red or green? If it's red then soundcense didn't know where to find df. Check the settings tab and turn off the automatic detect option. Then you'll be able to set the path manually.

Pls let me know if you still have problems.

As for the auto detection I'll look into it later tonight. It might be broken.

My icon was indeed red. When setting the path manually, it seemed to have the correct folder selected, but not the file within. It opened up in the right folder and I selected the gamelog. Music started playing immediately. So far that is all I have heard, but I didn't play long, just wanted to do a quick test. Is there a quick way to force some other sounds, or any actions I can take in game to check if everything is working fine?

Also, was I correct in assuming the sound should be set to Off in the LNP?

Thanks for your help! And thanks to both you and zwei for a great addon! (and of course to all the modders that help make this game even greater!)
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on July 25, 2017, 11:58:17 am
You're welcome.

And yes, the sound entry in LNP should be off. Otherwise DF and soundcense would be playing at the same time.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Buckley on July 29, 2017, 09:02:21 am
Hi blacksmokedmax,

Is the colored icon in the lower right hand corner of the window red or green? If it's red then soundcense didn't know where to find df. Check the settings tab and turn off the automatic detect option. Then you'll be able to set the path manually.

Pls let me know if you still have problems.

As for the auto detection I'll look into it later tonight. It might be broken.

My icon was indeed red. When setting the path manually, it seemed to have the correct folder selected, but not the file within. It opened up in the right folder and I selected the gamelog. Music started playing immediately. So far that is all I have heard, but I didn't play long, just wanted to do a quick test. Is there a quick way to force some other sounds, or any actions I can take in game to check if everything is working fine?

Also, was I correct in assuming the sound should be set to Off in the LNP?

Thanks for your help! And thanks to both you and zwei for a great addon! (and of course to all the modders that help make this game even greater!)

Came here to look for answers to the exact same issue.  Was getting no sound and having the log throw the wrong checksum error.  Disabled auto detect and manually set the path to open the gamelog and it started working immediately... music, sounds, etc.

Now Ima fuddle around with config options.

Thanks for this utility.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Algorithman on July 29, 2017, 09:52:18 am
you're welcome

I think the wrong checksum error actually
is wanted by zwei to be able to update the other xml files without changing the main xml.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Thundercraft on October 08, 2017, 11:40:30 pm
It's been a while since I played DF and I sort of forgot that SoundCenSe was a thing. Since it looks like this is still being developed and since a C# port is probably more CPU efficient, perhaps it is possible to implement a suggestion I made for Soundsense?

Zwei, would it be feasible to code SoundSense such that it could access the "soundpack.zip" archive and treat it as if it was the "packs" folder? It would save a lot of disk space!

I know Windows Explorer is able to treat .zip files as if they were merely sub-directories. Even so, I guess you'd have to include LZH decompression/compression algothrithms or plugins to make that work? Also, it would probably conflict with the AutoUpdate feature, correct? Though, personally, I wouldn't mind disabling AutoUpdate if it meant being able to use a .zip for the packs directory.

Whoa, difference is nearly 50mb. I actually thought mp3s would compress really bad.

Reading zip file is problematic - it can be done, but utility/work ratio is bad, imho.

Would this be worth it, coding SoundCenSe to read directly from a .ZIP of the sounds? Or, would this be a bad idea for some reason?
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: milo christiansen on October 09, 2017, 01:16:38 am
Reading a zip is any where from trivial to very difficult, depending on what library you use.

Not sure how it is for C#...

It would be a cool feature though, not just go save disk space.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Bumber on October 11, 2017, 07:10:31 am
You'd have to decompress a sound file before you could play it. (Windows Explorer unzips files into the temp directory when you try to open them.) This could create a delay before each sound plays for the first time.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: lethosor on October 11, 2017, 05:57:56 pm
Right, but just to clarify, you wouldn't necessarily have to decompress them to new files (depends on what you're using to play sound, I suppose). Disk I/O could create delays, but I wouldn't expect decompression to unless the sounds are really long.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: milo christiansen on October 11, 2017, 06:23:04 pm
You can extract individual items from a zip file easy. Just decompress into a memory buffer and play from there. I do similar things in Rubble all the time. Decompressing a few megs to memory is fast enough you won't notice delays (provided it is done properly).
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: jseph1234 on December 22, 2017, 05:05:56 pm
Those are some pretty rockin enhancements, particularly the "no Java" part :)
Yeah, but the downside to that is the Windows-only part.
Who gives a Sh!t, at least he did it and A LOT of us are Windows only users!
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: jecowa on December 22, 2017, 08:42:41 pm
The post you are replying to is 17 months old. SoundCenSe has Linux and Mac builds now.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: SneakyGunz on February 19, 2018, 07:47:06 am
Thanks for this solution. The autodetect is not working with the packaged starter pack.
Directing it to:
    C:\Users\SneakyGunz\Desktop\DwarfFortress\Dwarf Fortress 44.05\Dwarf Fortress 0.44.05\gamelog.txt
worked perfectly. Thank you, thank you.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Pvt. Pirate on April 12, 2018, 08:40:03 am
The post you are replying to is 17 months old. SoundCenSe has Linux and Mac builds now.
can't find a linux download. is it all in the same downloadfile now?
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: lethosor on April 12, 2018, 08:44:20 am
I assume it's this, because I don't see another relevant link:
or compile it from source: https://github.com/Algorithman/SoundCenSe (https://github.com/Algorithman/SoundCenSe)
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Pvt. Pirate on April 12, 2018, 08:47:55 am
I assume it's this, because I don't see another relevant link:
or compile it from source: https://github.com/Algorithman/SoundCenSe (https://github.com/Algorithman/SoundCenSe)
doesnt look like what i'm searching for.
well, as far as i see, the latest universal version is already in mephs pack and in the LNP, so i just try using it.
Pvt. Pirate is a dabbling Linux User.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: lethosor on April 12, 2018, 10:18:03 am
To clarify, I'm saying that there probably isn't a download for Linux available, so you won't be able to find it. The alternative is building from source.

I'm confused by your comment. What is the "latest universal version"? What is "the" LNP (link?) and "mephs pack"? The latter in particular sounds like a Windows-only pack to me, unless Meph has put out a separate pack, which means either the SoundCenSe in that pack won't work at all on Linux, or you're actually talking about SoundSense, which is cross-platform but is not what this thread is about (see the thread title).
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Pvt. Pirate on April 12, 2018, 10:27:51 am
well, my post must have been confusing...
i can run DF through wine (using mephs pack), but neither SoundSense nor SoundCense seem to work under wine.
so what i am trying to do is running them directly in linux (which might be a foolish attempt) and point to the gamelog.txt inside wine.
i don't care which of the soundprograms will work as i'll just use the first one that does.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: strainer on April 12, 2018, 10:44:37 am
The latest LNPs (linux/lazy newb pack) have soundsense and soundcenseGTK included. Soundsense works here on debian wheezy, the soundcenseGTK doesnt, I assume it needs certain mono libraries arranged for it.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Thundercraft on June 11, 2018, 11:44:50 pm
To avoid getting off topic in the SoundSense thread, I'm replying to this SoundCense-related post (http://www.bay12forums.com/smf/index.php?topic=60287.msg7784173#msg7784173) here:

that's the problem, SoundCense doesn't work either.

Could you be more specific?

In what way does SoundCense not work? Does it not even launch? Or is it just not playing sound or music alongside DF?

Do you have all of the requirements installed?

System requirements:

Windows:

    .NET 4
    Microsoft Visual c++ runtime redistributables (https://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe)
    Gtk-Sharp (http://download.xamarin.com/GTKforWindows/Windows/gtk-sharp-2.12.38.msi)

If SoundCenSe doesn't seem to start (nothing happens when you open it), check the Log.txt file, there the url's will be provided too.
After installing gtk-sharp, a reboot might be needed even the installer doesn't tell you so.

Linux: (Debian)

    mono-complete
    gtk-sharp2

Also, are you using the SoundCense that comes packaged with a starter pack (and which starter pack)? If the answer is "yes", then your problem may be related to SneakyGunz's:

Thanks for this solution. The autodetect is not working with the packaged starter pack.
Directing it to:
    C:\Users\SneakyGunz\Desktop\DwarfFortress\Dwarf Fortress 44.05\Dwarf Fortress 0.44.05\gamelog.txt
worked perfectly. Thank you, thank you.

You could try changing the directory where SoundCense looks for gamelog.txt:
...might need to change the Configuration.json file, setting gamelogPath to ""

Alternatively, you could try installing the stand-alone version as linked in the OP (http://www.bay12forums.com/smf/index.php?topic=159567.0).
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: JSilva on July 28, 2018, 08:20:05 am
I installed PeridexisErrant's Starter Pack 0.44.12-r02.
I cannot get SoundCenSe to run. Maybe this is not that surprising, since I have not installed GTK-Sharp. The SoundCenSe log confirms that this is the problem with the series of messages "Checking dll in registry", "GTK# is not installed" and "GTK-Sharp is not installed".

I know where to get GTK-Sharp, but I want to avoid system-wide installs of libraries, if possible. Is there a way of just placing the required files in the SoundCenSe folder and still getting it to run?

By the way: After unzipping the Starter Pack, the SoundCenSe folder already has a "gtk-sharp.dll" file in it (among several other "*-sharp.dll" files). At first I believed that this would be enough for a stand-alone SoundCenSe, but it seems I'm wrong.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: urpokarhu on August 11, 2018, 05:01:15 am
Hello,

I'm using Windows 10, 150% DPI on, 2560x1440 and Soundcense looks like this when opening it;

https://imgur.com/a/cPKsIOb

Any suggestions? It seems to work if I change my resolution to 640x480. Doesn't it support 2k resolution then?
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: roel1976 on August 31, 2018, 12:24:26 am
I can't get SoundCense to produce any sounds. This is only entry in log after I start DF:

2018-08-31 07:14:16.3657|WARN|SoundCenSeGTK.MainClass|Checking dll in registry
2018-08-31 07:14:17.0963|WARN|SoundCenSeGTK.SoundsXML|Include listing tag without valid 'filePathAndName' attribute encountered (make sure it ends in '.xml'!).

Does anyone know what it means and how I can fix this?
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Lorex on October 20, 2018, 07:44:52 am
The rain sound always plays even if it's clear sky, first I thought it was the SC inside LNP but it's the same using the stand-alone version. It looks like it was fixed in 1.4.1 but I have the last version and still happens. Is it only me? For now I had to disable rain sounds.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: nekoexmachina on September 03, 2019, 07:24:31 am
Crashes every so often:

Quote
Exception in Gtk# callback delegate
  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.NullReferenceException: Object reference not set to an instance of an object
  at SoundCenSeGTK.FmodChannelPool.IsSoundPlaying (System.String filename) [0x00029] in <f37300e414084686af6d233f37ba2863>:0
  at SoundCenSeGTK.fmodPlayer.PlaySound (SoundCenSeGTK.SoundSoundFile sf, System.String channel, System.Single volume, System.Boolean mute) [0x0019d] in <f37300e414084686af6d233f37ba2863>:0
  at SoundCenSeGTK.fmodPlayer.LoopSound (System.Object sender, Misc.RestartSoundLoopEventArgs restartSoundLoopEventArgs) [0x00106] in <f37300e414084686af6d233f37ba2863>:0
  at SoundCenSeGTK.fmodChannelSound.OnSoundEnded () [0x0007f] in <f37300e414084686af6d233f37ba2863>:0
  at SoundCenSeGTK.fmodChannelSound.<Callback>b__0 (System.Object param0, System.EventArgs param1) [0x00001] in <f37300e414084686af6d233f37ba2863>:0
  at Gtk.Application+InvokeCB.Invoke () [0x00000] in <e2cf54bd50544b3dbf94649395d8c893>:0
  at GLib.Timeout+TimeoutProxy.Invoke (System.IntPtr data) [0x00000] in <ed39f21b9e9343dcbd442a17ad356a9f>:0
  at GLib.SourceProxy.HandlerInternal (System.IntPtr data) [0x00000] in <ed39f21b9e9343dcbd442a17ad356a9f>:0
  at GLib.ExceptionManager.RaiseUnhandledException (System.Exception e, System.Boolean is_terminal) [0x00000] in <ed39f21b9e9343dcbd442a17ad356a9f>:0
  at GLib.SourceProxy.HandlerInternal (System.IntPtr data) [0x00000] in <ed39f21b9e9343dcbd442a17ad356a9f>:0
  at Gtk.Application.gtk_main () [0x00000] in <e2cf54bd50544b3dbf94649395d8c893>:0
  at Gtk.Application.Run () [0x00000] in <e2cf54bd50544b3dbf94649395d8c893>:0
  at SoundCenSeGTK.MainClass.Main (System.String[] args) [0x00000] in <f37300e414084686af6d233f37ba2863>:0
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Pvt. Pirate on September 03, 2019, 02:25:02 pm
crashes of SoundSense were solved for me when enhancing the cache of pulseaudio to 128MiB.
maybe it can help with SoundCense too.
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: Salano on September 06, 2019, 07:41:23 pm
Quote
Is the colored icon in the lower right hand corner of the window red or green? If it's red then soundcense didn't know where to find df. Check the settings tab and turn off the automatic detect option. Then you'll be able to set the path manually.
OP, if you're still watching this thread, could you append this line to the main topic post? I couldn't get SoundCenSe to work until I combed through this post to find this solution. I imagine a lot of people are getting this issue, not finding a solution, and simply returning to using SoundSense. Thanks
Title: Re: SoundCenSe, a c# port of SoundSense
Post by: shurikt on February 03, 2022, 11:24:22 pm
The download.xamarin.com link for GTK-sharp is now dead and redirects to a Microsoft page. This link works, though: https://xamarin.azureedge.net/GTKforWindows/Windows/gtk-sharp-2.12.45.msi (https://xamarin.azureedge.net/GTKforWindows/Windows/gtk-sharp-2.12.45.msi)

I found it here: https://www.mono-project.com/download/stable/ (https://www.mono-project.com/download/stable/)