swharden / Spectrogram

.NET library for creating spectrograms (visual representations of frequency spectrum over time)
https://nuget.org/packages/Spectrogram
MIT License
320 stars 58 forks source link

Add() should accept IEnumerable #35

Closed swharden closed 3 years ago

swharden commented 3 years ago

Content originally posted by @shirok1 in #33:


An unnecessary type requirement in signature of sg.Add()

image

List<double>.AddRange accepts an IEnumerable<double> as the parameter. However, sg.Add() asks for an explicit double[], which means that I can't directly use the List<double> but have to do a .ToArray() first, which obvious will waste the memory as large as the audio itself.