Comments (2)
NAudio.Wave.WaveFileReader
subclasses NAudio.Wave.WaveStream
which in turn subclasses System.IO.Stream
... which implements the CopyTo
method. If you aren't able to use CopyTo
then something is drastically wrong.
From the other question you posted about NAudio
being missing I suspect that it was the cause of this error as well. Can you confirm that re-adding the NAudio
package has resolved this issue as well?
System.IO.Stream
has been defined in mscorlib
since at least .NET 1.1, and you shouldn't be able to build a program without it. That eliminates 'missing assembly reference' from our list of causes, but since CopyTo
was introduced fairly late in the game... what version of .NET are you compiling against? If it's prior to .NET 4 you might have issues. You can add an extension to get what you need:
public static partial class Extensions
{
public static void CopyTo(this Stream source, Stream target)
{
byte[] buffer = new byte[8192];
int rc;
while ((rc = source.Read(buffer, 0, buffer.Length)) > 0)
target.Write(buffer, 0, rc);
}
}
Not perfect but it should do the trick.
I'm not sure what else might be missing from versions of .NET prior to 4.0 that could cause you issues.
from naudio.lame.
Thanks for your help. It worked.
from naudio.lame.
Related Issues (20)
- LAMEPreset V0 to V9 has no effect HOT 2
- please update Nuget pakage to include the last changes. HOT 1
- Enhance LameConfig to support more VBR options HOT 1
- Incompatibility with NAudio 2.0.0-beta1 HOT 10
- LameMP3FileWriter encodes with random bitrate value when using FileStream.Create to generate a File (Stream) HOT 6
- How to get best audio quality
- Null reference exception on flush (or dispose) HOT 1
- NAudio.Lame.dll dont copy to bin directory
- NAudio.Lame and fody.costura HOT 7
- Call LameMP3FileWriter.Write() from Task.Run() HOT 4
- Signed dll HOT 1
- Unicode COMM tags are not written correctly
- Converting WAV to MP3 truncate file length HOT 1
- ARM64 version? HOT 1
- Needs update for NAudio.Core V2.1 HOT 1
- Length of encoded audio signal increases compared to the origin HOT 4
- Unity Error HOT 1
- ID3Decoder's handling of APIC entries improperly assumes variable encoding for MIME type HOT 1
- naudio.lame is missing NuGet package README file
- Any way to run NAudio.Lame on ubuntu to convert from wav to mp3? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from naudio.lame.