Quantcast
Channel: NAudio
Viewing all 5831 articles
Browse latest View live

New Post: Converting WAVs to AIFFs

$
0
0

hi Giawa, this is brilliant. I'll try to get this into NAudio for v1.7

thanks so much

Mark


Source code checked in, #581a62c2c1d1

$
0
0
Created MediaFoundationReader allowing NAudio to use Media Foundation API to play anything it supports which on Win 7 should include MP3, AAC, WMA. Thanks to Lucian Wischik for much of the interop work

Source code checked in, #c87491ff704f

$
0
0
creating NuGet prerelease package

Source code checked in, #656277cc67ba

$
0
0
Adding AiffFileWriter contributed by Giawa

New Post: Converting WAVs to AIFFs

$
0
0

I've committed the new class, although haven't had a chance to test it yet. Any chance you could do a quick code review for me. The change ishere.

many thanks for this contribution.

Mark

Commented Issue: Generator [16367]

$
0
0
Here is an audio generator to test the installation (Pink noise, white noise, Sweep, Sin, Square, Triangle, Sawtooth) with PhaseReverse.
Frequency Fixed or variable.
Waveforms and frequencies were correct with external software (SmaartLive7) and an oscilloscope.


There is nothing unusual in the calculation of waveforms.

Integration into NAudio a IWaveProvider or ISampleProvider.

Files Attachment: Class WaveGenerator.cs and complement for demo.

I suspect that this class will not be used much but it just still be useful
Comments: hi, I'm working on integrating this into the next NAudio. I've made a few changes, but mostly it looks like a really nice addition to the library so thanks very much

Source code checked in, #966ae54a7483

$
0
0
added a signal generator class contributed by ManuN, currently untested. Can do various waveforms (sine, triangle, sawtooth etc) plus pink and white noise

Source code checked in, #c967d695bc0a

$
0
0
added the signal generator demo from ManuN, not currently working yet

Commented Issue: Generator [16367]

$
0
0
Here is an audio generator to test the installation (Pink noise, white noise, Sweep, Sin, Square, Triangle, Sawtooth) with PhaseReverse.
Frequency Fixed or variable.
Waveforms and frequencies were correct with external software (SmaartLive7) and an oscilloscope.


There is nothing unusual in the calculation of waveforms.

Integration into NAudio a IWaveProvider or ISampleProvider.

Files Attachment: Class WaveGenerator.cs and complement for demo.

I suspect that this class will not be used much but it just still be useful
Comments: OK, it's in the libary (called "SignalGenerator") but I may have broken it in my attempts to "fix" it. I'll see if I can work out where the problem is

Source code checked in, #65410ffba3c6

$
0
0
fixed the signal generator demo, added ability to save a 20s WAV file

Edited Issue: Generator [16367]

$
0
0
Here is an audio generator to test the installation (Pink noise, white noise, Sweep, Sin, Square, Triangle, Sawtooth) with PhaseReverse.<br />Frequency Fixed or variable.<br />Waveforms and frequencies were correct with external software (SmaartLive7) and an oscilloscope.<br /><br /><br />There is nothing unusual in the calculation of waveforms.<br /><br />Integration into NAudio a IWaveProvider or ISampleProvider.<br /><br />Files Attachment: Class WaveGenerator.cs and complement for demo.<br /><br />I suspect that this class will not be used much but it just still be useful

Commented Issue: Generator [16367]

$
0
0
Here is an audio generator to test the installation (Pink noise, white noise, Sweep, Sin, Square, Triangle, Sawtooth) with PhaseReverse.<br />Frequency Fixed or variable.<br />Waveforms and frequencies were correct with external software (SmaartLive7) and an oscilloscope.<br /><br /><br />There is nothing unusual in the calculation of waveforms.<br /><br />Integration into NAudio a IWaveProvider or ISampleProvider.<br /><br />Files Attachment: Class WaveGenerator.cs and complement for demo.<br /><br />I suspect that this class will not be used much but it just still be useful
Comments: got it working, the demo had set the device number to 2. I've added a button that lets you save 20s worth of signal. Maybe a future update could add portamento to allow smooth changing of frequency (and also of gain)

New Post: NAudio eating memory

$
0
0

you need to remember to call Dispose your Mp3FileReader and your waveOutDevice before creating new ones

Source code checked in, #65e8578387d9

$
0
0
Created an experimental Windows 8 Store class library project. Includes as many classes from NAudio as possible, but currently lots missing - especially file reader/writers which need to support new file APIs. Also WASAPI playback and capture which should be possible in Win 8 needs some rework before it can be moved in. Required a number small changes to existing classes to help the code compile on both platforms.

New Comment on "Convert a MP3 to WAV"

$
0
0
"txtLocation" not in the present context?

Commented Issue: Generator [16367]

$
0
0
Here is an audio generator to test the installation (Pink noise, white noise, Sweep, Sin, Square, Triangle, Sawtooth) with PhaseReverse.<br />Frequency Fixed or variable.<br />Waveforms and frequencies were correct with external software (SmaartLive7) and an oscilloscope.<br /><br /><br />There is nothing unusual in the calculation of waveforms.<br /><br />Integration into NAudio a IWaveProvider or ISampleProvider.<br /><br />Files Attachment: Class WaveGenerator.cs and complement for demo.<br /><br />I suspect that this class will not be used much but it just still be useful
Comments: hello, Sorry for the selection of driver forgets, and sorry for your lost time because of this error on my part. If I have some time to do an update to add portamento. this is probably a good idea to add a procedure "Save" for some users :-)

New Post: wma arggggggg

$
0
0

hello,

For a while, I try to play wma files or other formats of the same kind with a driver or ASIO CoreAPI and I am still facing the same error.

I even included a MediaFoundation procedure (similar to that published in the new version of NAudio, a lot of work, and congratulations to the author) but it's still the same problem.


I end up with this error ::
"NAudio.MediaFoundation.IMFSourceReader ..... This interface is not supported (Exception from HRESULT 0x80004002 (E_NOINTERFACE)


However, the procedure works with audio driver WavOut () standart (without Thread).

So if someone find the trick to read files type. "Wma" with ASIO or driverAudio CoreAPI


Mark: I know I've raised the issue .. (see http://naudio.codeplex.com/workitem/16370) but hey, a call for commonality from time to time :-)


Sincerely, manun

New Post: wma arggggggg

$
0
0

the issue here is almost certainly threading. You're creating and initialising the COM object on one thread and accessing it from another. That's why WaveOut works, while the other models which use background threads don't. You could try marking your app as being MTAThread instead of STAThread. Alternatively, you could create a wrapper around your IWaveProvider that doesn't perform any initialisation until the first call to Read comes in, which will be on the correct thread.

I've only just committed the IMFSourceReader yesterday and it's by no means finished. I need to add in some locking for positioning while you are playing and I will be trying it out with various threading options and models over the coming weeks.

Mark

New Post: wma arggggggg

New Post: NAudio 1.6 - Wasapi Loopback COMException

$
0
0

I wrote a small test program in vb.net 2012 , the program is to record "what you hear" using the new WasapiCapture class.   Upon  invoking the wasapi.startrecording function, I  get a ComException from NAudio. I searched Microsoft KB but the exception number was not there

 

has anyone encountered something similar?

 

 

 

the code is as follows:

Imports naudio
Imports naudio.wave
Imports NAudio.CoreAudioApi

Public Class Form1
    Dim WithEvents Wasapi As WasapiCapture
    Dim Writer As WaveFileWriter
    Dim WvFormat As WaveFormat
    Dim mmdev As MMDeviceEnumerator
    Dim audio As MMDevice


    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        mmdev = New MMDeviceEnumerator
        audio = mmdev.GetDefaultAudioEndpoint(DataFlow.Render, Role.Multimedia)
        WvFormat = audio.AudioClient.MixFormat
        Wasapi = New WasapiCapture(audio)
        Wasapi.WaveFormat = WvFormat
        Writer = New WaveFileWriter("E:\2.wav", WvFormat)
        ''
        ''
    End Sub

    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
        Application.Exit()
    End Sub

    Private Sub Wasapi_DataAvailable(sender As Object, e As WaveInEventArgs) Handles Wasapi.DataAvailable
        Writer.Write(e.Buffer, 0, e.BytesRecorded)
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        If Wasapi IsNot Nothing Then
            Wasapi.StartRecording()
        End If
        ''''
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        If Wasapi IsNot Nothing Then
            Wasapi.Dispose()
            Wasapi = Nothing
        End If
        ''
        If Writer IsNot Nothing Then
            Writer.Flush()
            Writer.Close()
        End If
        ''
    End Sub

    Private Sub Wasapi_RecordingStopped(sender As Object, e As EventArgs) Handles Wasapi.RecordingStopped
        '''''
        If Writer IsNot Nothing Then Writer.Dispose()
        ''''
        If Wasapi IsNot Nothing Then Wasapi.Dispose()
        ''''
    End Sub

  
End Class

 

 

Viewing all 5831 articles
Browse latest View live