home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / DTMF_DECOD2036591292006.psc / DTMF_DECODER_FINAL / clsDSP.cls next >
Text File  |  2006-12-09  |  2KB  |  78 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4.   Persistable = 0  'NotPersistable
  5.   DataBindingBehavior = 0  'vbNone
  6.   DataSourceBehavior  = 0  'vbNone
  7.   MTSTransactionMode  = 0  'NotAnMTSObject
  8. END
  9. Attribute VB_Name = "clsDSP"
  10. Attribute VB_GlobalNameSpace = False
  11. Attribute VB_Creatable = True
  12. Attribute VB_PredeclaredId = False
  13. Attribute VB_Exposed = False
  14. Option Explicit
  15.  
  16. ' Digital Signal Processing Class for 16 bit samples
  17. Private Const Pi                    As Single = 3.14159265358979
  18. Private lngSamplerate               As Long
  19. Private intChannels                 As Integer
  20.  
  21. Public Property Get samplerate( _
  22. ) As Long
  23.  
  24.     samplerate = lngSamplerate
  25. End Property
  26.  
  27. Public Property Let samplerate( _
  28.     ByVal lngSR As Long _
  29. )
  30.  
  31.     If lngSR < 1 Or lngSR > 96000 Then
  32.         Err.Raise 32000, "invalid samplerate"
  33.     Else
  34.         lngSamplerate = lngSR
  35.         UpdateFX
  36.     End If
  37. End Property
  38.  
  39. Public Property Get Channels( _
  40. ) As Integer
  41.  
  42.     Channels = intChannels
  43. End Property
  44.  
  45. Public Property Let Channels( _
  46.     ByVal intCh As Integer _
  47. )
  48.  
  49.     If intCh < 1 Or intCh > 2 Then
  50.         Err.Raise 32000, "invalid channels"
  51.     Else
  52.         intChannels = intCh
  53.         UpdateFX
  54.     End If
  55. End Property
  56.  
  57.  
  58.  
  59.  
  60. Public Sub ProcessSamples( _
  61.     intSamples() As Integer _
  62. )
  63.  
  64.     Dim i   As Long
  65.  
  66.     If lngSamplerate = 0 Then Exit Sub
  67.     If intChannels = 0 Then Exit Sub
  68.  
  69.     
  70. End Sub
  71.  
  72.  
  73. Private Sub UpdateFX()
  74.     If lngSamplerate = 0 Then Exit Sub
  75.     If intChannels = 0 Then Exit Sub
  76.  
  77. End Sub
  78.