---
title: "AviAudioManager..::.ExportAudioStream Method (Int32, Stream)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Codecs_AviAudioManager_ExportAudioStream_2_0e0c4d43.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# AviAudioManager.ExportAudioStream Method (Int32, Stream)
 
Saves the audio stream with specified index to a [System.IO.Stream](http://msdn2.microsoft.com/en-us/8f86tw9e) object.
 
**Namespace:** [Aurigma.GraphicsMill.Codecs](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Codecs.htm.md)
 **Assembly:** Aurigma.GraphicsMill.Codecs.AviProcessor (in Aurigma.GraphicsMill.Codecs.AviProcessor.dll)
 
## Syntax
  
```
Public Sub ExportAudioStream ( _streamIndex As Integer, _stream As Stream _
)
```
 
```csharp
public void ExportAudioStream(int streamIndex,Stream stream
)
```
 
### Parameters
 
 - streamIndex
     - Type: [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d)
An index of the audio stream.

 - stream
     - Type: [System.IO.Stream](http://msdn2.microsoft.com/en-us/8f86tw9e)
A destination [System.IO.Stream](http://msdn2.microsoft.com/en-us/8f86tw9e) object.
 
## Remarks
  
Stream indexes are zero-based. To get the total number of audio streams, use the [AudioStreamCount](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Codecs_AviAudioManager_AudioStreamCount.htm.md) property.
 
**Note** 
You can use this member only if you get this instance of the [AviAudioManager](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_AviAudioManager.htm.md) from the reader object.
   
## See Also

### Reference

- [AviAudioManager Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_AviAudioManager.htm.md)
- [ExportAudioStream Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_Codecs_AviAudioManager_ExportAudioStream.htm.md)
- [Aurigma.GraphicsMill.Codecs Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Codecs.htm.md)
