~ubuntu-branches/ubuntu/breezy/kdemultimedia/breezy

« back to all changes in this revision

Viewing changes to noatun/modules/winskin/vis/visQueue.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2005-03-24 04:48:58 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050324044858-8ff88o9jxej6ii3d
Tags: 4:3.4.0-0ubuntu3
Add kubuntu_02_hide_arts_menu_entries.diff to hide artsbuilder and artscontrol k-menu entries

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  queue fft samples
 
3
  Copyright (C) 2001  Martin Vogt
 
4
 
 
5
  This program is free software; you can redistribute it and/or modify
 
6
  it under the terms of the GNU Library General Public License as published by
 
7
  the Free Software Foundation.
 
8
 
 
9
  For more information look at the file COPYRIGHT in this package
 
10
 
 
11
 */
 
12
 
 
13
 
 
14
#include "visQueue.h"
 
15
 
 
16
 
 
17
VISQueue::VISQueue(int elements) {
 
18
  this->elements=elements;
 
19
  
 
20
  visArrayQueue = new std::vector<float>*[elements];
 
21
  for(int i=0;i<elements;i++)
 
22
  {
 
23
     visArrayQueue[i]=new std::vector<float>;
 
24
  }
 
25
 
 
26
}
 
27
 
 
28
VISQueue::~VISQueue() {
 
29
  for(int i=0;i<elements;i++) {
 
30
    delete visArrayQueue[i];
 
31
  }
 
32
  delete [] visArrayQueue;
 
33
}
 
34
 
 
35
std::vector<float>* VISQueue::getElement(int i)
 
36
{
 
37
  if ( (i < 0) || (i>elements) ) {
 
38
    return visArrayQueue[0];
 
39
  }
 
40
  return visArrayQueue[i];
 
41
}
 
42
 
 
43