Commit Graph

37 Commits

Author SHA1 Message Date
Pieter-Jan Briers
de4d255841 Analyzer to enforce classes to be either [Virtual], abstract, or sealed. (#2469)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-02-05 19:31:58 +01:00
Vera Aguilera Puerto
5eda1b326d Inline OwnerUid 2021-12-03 16:30:34 +01:00
Vera Aguilera Puerto
a9ee78e40d MIDI player looping fix.
SetLoop sets the amount of times to loop a song. If you set it to 1, it'll loop once, if you set it to -1, it'll loop infinitely. This should have been 0 from the start, so it doesn't loop when disabled.
2021-11-25 15:06:55 +01:00
20kdc
55fecc95a9 MIDI VolumeBoost property (#2141) 2021-10-22 09:09:24 +02:00
Vera Aguilera Puerto
59af9451be Various improvements to midi
- MidiEvent control is now an int
- Instead of hardcoding the channel count, we check the count on the synth itself.
- Do nothing for event 0x51
2021-08-26 15:01:34 +02:00
Vera Aguilera Puerto
a6be66949d Fix segfault when MIDI renderer is disposed.
Apparently? You need to dispose of the sequencer BEFORE the synth or a funny segfault will occur... T-Thanks libfluidsynth.
Also unregisters the sequencer clients before disposing, just for cleanliness.
2021-06-28 10:59:20 +02:00
Pieter-Jan Briers
1e33c3c843 MIDI renderer debugging code. 2021-05-23 22:58:32 +02:00
Vera Aguilera Puerto
b3f3ca9725 MIDI renderer uses NumericsHelpers to convert stereo audio to mono. 2021-05-23 13:40:06 +02:00
Vera Aguilera Puerto
33c37393ba Fixes incorrect comment in MidiRenderer.
Pain.
2021-05-23 13:15:31 +02:00
Vera Aguilera Puerto
a23da702b1 MidiManager now has a Volume property which changes the general midi volume.
- Adds VV attributes to MidiManager and MidiRenderer.
2021-05-18 20:03:20 +02:00
Vera Aguilera Puerto
8334050411 MIDI improvements (#1756) 2021-05-16 19:28:14 +02:00
Acruid
2183cd7ca1 Massive Namespace Cleanup (#1544)
* Removed the Interfaces folder.
* All objects inside the GameObjects subfolders are now in the GameObjects namespace.
* Added a Resharper DotSettings file to mark the GameObjects subfolders as not providing namespaces.
* Simplified Robust.client.Graphics namespace.
* Automated remove redundant using statements.
2021-02-10 23:27:19 -08:00
Vera Aguilera Puerto
8b9dadffb1 MIDI improvements (#1526) 2021-02-02 18:46:24 +01:00
Ygg01
ad8b0b3c83 Add bytes or sbytes to enum where available (#1430)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-12-08 12:46:30 +01:00
Pieter-Jan Briers
a41f64f30e sandboxing (#1408) 2020-11-26 23:37:31 +01:00
DrSmugleaf
b8e5b47e7a Use 'new' expression in places where the type is evident for the engine (#1415)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-11-26 00:16:55 +01:00
Peter Wedder
a6a98fb6b4 Add program change event field to IMidiRenderer (#1369) 2020-10-30 00:51:32 +01:00
DrSmugleaf
0a67cecfa5 Replace every usage of GridCoordinates with EntityCoordinates (#1280)
* Added struct skeleton for EntityCoordinates.

* Polish EntityCoordinates, add tests, add EntityCoordinates to Transforms

* Doc cleanup

* Remove useless code

* Return offset 0 when you don't have a parent

* Test for making sure EntityCoordinates for entities without parents have offset 0

* Use parent transform's GridId for GetGridId.

* Adds various methods, checks and tests

* Replace GridCoordinates with EntityCoordinates

* EyeManager.WorldToScreen fix

* Address reviews

* Fix za buildo

* Fix one transform test

* Fix the remaining tests

* Remove duplicate

* Remove another merge duplicate

* Fix property

* Rename most usages of GridCoordinates to EntityCoordinates.

* Add WithEntityId method to EntityCoordinates.

* Fix EntityCoordinates usage in GetEntitiesInRange

* Remove cursed IMapGrid method, change naming.

* Makes GridTileLookupSystem use EntityCoordinates

Co-authored-by: Acruid <shatter66@gmail.com>
Co-authored-by: Víctor Aguilera Puerto <zddm@outlook.es>
2020-09-06 16:09:19 +02:00
Víctor Aguilera Puerto
afc5aa1075 Dispose of MIDI renderers on the MIDI thread (#1248) 2020-08-21 20:39:36 +02:00
Pieter-Jan Briers
6674be3adc Client NRTs (#1121) 2020-06-12 12:57:39 +02:00
Víctor Aguilera Puerto
5c82a4ccb3 Join with MIDI player while stopping it. 2020-06-04 21:03:35 +02:00
Víctor Aguilera Puerto
5473fd183b Ignore invalid MIDI event of type 5 to prevent console spam. 2020-06-04 19:30:46 +02:00
Clyybber
fcdabe98f4 Tiny cleanup (#1098) 2020-06-02 14:40:08 +02:00
Tyler Young
885bcb4f57 Fix up midi stuff, support mild black midis (#1092) 2020-06-02 01:08:56 +02:00
Víctor Aguilera Puerto
94c868a395 Add missing properties to IMidiRenderer. 2020-05-29 17:19:14 +02:00
Víctor Aguilera Puerto
070ad6989c MIDI improvements
* Handle a few more MIDI events.
* Remove useless MIDI error logging.
* MidiEvent ToString() has useful info.
* Autoload soundfonts from Content.
2020-05-29 17:14:55 +02:00
Clyybber
9d75c3a1c8 Implement audio occlusion and upgrade to OpenTK 4 (#1068) 2020-05-27 17:50:01 +02:00
Víctor Aguilera Puerto
149fe47424 Better MIDI (#1062) 2020-05-22 13:07:02 +02:00
Víctor Aguilera Puerto
4ea42107b5 Increase buffers for MIDI and log MIDI buffer overflows. (#1059) 2020-05-18 15:11:15 +02:00
Víctor Aguilera Puerto
e394ade45c Reduce MIDI sample rate (#1057)
* Reduce MIDI sample rate

* Raise buffer count to 11
2020-05-17 01:03:25 +02:00
Víctor Aguilera Puerto
40c22563e3 Improves MIDI further (#1048) 2020-05-06 19:21:59 +02:00
Pieter-Jan Briers
57f62dd98a SSE2 accelerate MIDI stereo -> mono for fun and profit. 2020-05-05 15:20:36 +02:00
Víctor Aguilera Puerto
5d4e3ebf9d Midi optimizations. (#1045) 2020-05-05 14:50:04 +02:00
Pieter-Jan Briers
b63c7eb6ab Fix MIDI audio crackles. 2020-05-02 18:01:55 +02:00
Pieter-Jan Briers
3926de43de Fix GC issues with sound font loader callbacks.
Also slight optimizations.
2020-04-24 02:11:59 +02:00
Tad Hardesty
613368edde Fix Sonar warnings in MidiRenderer (#937) 2020-01-22 08:23:57 +01:00
Víctor Aguilera Puerto
ffe506ef94 Adds Midi playback, Midi input, etc. (#873)
* raw PCM audio for clyde

* Remove soundfont.cs

* Midi stuff

* Some more work

* This actually works now!

* update

* Add nfluidsynth submodule.

* fuck

* Midi audio works!

* Lots of stuff, and cool interfaces for items

* Update

* Note limit

* Moving out of range of UI raises OnClosed now as well

* It just works

* Update nfluidsynth submodule

* Remove managed-midi, remove unused methods I added to clyde

* Remove remnants of older NFluidsynth

* Update nfluidsynth submodule.

* Fix some of MidiManager

* Add changes PJB made to soundfont loading

* Delete OpenAL source/buffers when disposed

* Remove remnants of "Rendering"

* Use ReadOnlySpan, make interface/implementation arguments consistent

* Improve EmptyBuffers performance

* Make renderers use an enum for their status

* MidiRenderer events are now invoked on the main thread

* MidiManager now has a method to dispose renderers

* Lock player

* Fun stuff

* Update nfluidsynth submodule.

* Fix midi audio rendering

* Address a few reviews

* Revert changes made to Clyde

* Create sfloader per midi renderer

* Midi file size check

* Now OpenMidi/OpenInput and their respective close methods return bools.

* Update nfluidsynth submodule.

* Move number to constant.

* Use BufferedAudioSource

* Remove unused using statements

* Use new API

* Lock player and synth correctly

* Use midi sawmill

* Adds "Disposed" property to MidiRenderer

* Remove DisposeRenderer, let midi render thread handle it instead

* Renderer position is updated from main loop

* Use nfluidsynth from nuget

* Fix appveyor, lazy fluidsynth init

* Only join MidiThread if it actually exists...
2019-10-30 16:45:11 +01:00