* Separate out analysis and synthesis window sizes from FFT size.

This is an internal change only, so far -- results should be
  unchanged from 1.5.0.
This commit is contained in:
Chris Cannam
2010-05-16 10:44:38 +01:00
parent 8b3a5e4979
commit 3ed58ba356
16 changed files with 285 additions and 281 deletions

View File

@@ -44,15 +44,11 @@ T *allocate(size_t count)
if (posix_memalign(&ptr, 16, count * sizeof(T))) {
ptr = malloc(count * sizeof(T));
}
#else
#ifdef __MSVC__
ptr = _aligned_malloc(count * sizeof(T), 16);
#else
// Note that malloc always aligns to 16 byte boundaries on OS/X,
// so we don't need posix_memalign there (which is fortunate,
// since it doesn't exist)
ptr = malloc(count * sizeof(T));
#endif
#endif
if (!ptr) throw(std::bad_alloc());
return (T *)ptr;
@@ -70,11 +66,7 @@ T *allocate_and_zero(size_t count)
template <typename T>
void deallocate(T *ptr)
{
#ifdef __MSVC__
if (ptr) _aligned_free((void *)ptr);
#else
if (ptr) free((void *)ptr);
#endif
}

View File

@@ -47,11 +47,6 @@ void gettimeofday(struct timeval *p, void *tz);
#endif
#ifdef __MSVC__
void usleep(unsigned long);
#endif
enum ProcessStatus { ProcessRunning, ProcessNotRunning, UnknownProcessStatus };
extern ProcessStatus GetProcessStatus(int pid);