---
title: "AviAudioManager..::.GetAudioDuration Method (Stream)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Codecs_AviAudioManager_GetAudioDuration_1_bca7c9fe.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.GetAudioDuration Method (Stream)
 
Returns the duration of the first stream in the specified [Stream](http://msdn2.microsoft.com/en-us/8f86tw9e) with an audio file.
 
**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 Shared Function GetAudioDuration ( _stream As Stream _
) As Integer
```
 
```csharp
public static int GetAudioDuration(Stream stream
)
```
 
### Parameters
 
 - stream
     - Type: [System.IO.Stream](http://msdn2.microsoft.com/en-us/8f86tw9e)
The [Stream](http://msdn2.microsoft.com/en-us/8f86tw9e) object with the file containing the audio data. It may be any RIFF-compliant file (like WAV or AVI).
 
### Return Value
An integer value which contains the duration of the specified audio file. It is measured in 1/100 of seconds.
   
## See Also

### Reference

- [AviAudioManager Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_AviAudioManager.htm.md)
- [GetAudioDuration Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_Codecs_AviAudioManager_GetAudioDuration.htm.md)
- [Aurigma.GraphicsMill.Codecs Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Codecs.htm.md)
