IPS-LMU / wrassp

wrassp is a wrapper for R around Michel Scheffers's libassp (Advanced Speech Signal Processor). The libassp library aims at providing functionality for handling speech signal files in most common audio formats and for performing analyses common in phonetic science/speech science. This includes the calculation of formants, fundamental frequency, root mean square, auto correlation, a variety of spectral analyses, zero crossing rate, filtering etc. This wrapper provides R with a large subset of libassp's signal processing functions and provides them to the user in a (hopefully) user-friendly manner. The wrassp package is used by the EMU Speech Database Management System (EMU-SDMS) to perform signal processing routines.
http://ips-lmu.github.io/EMU.html
22 stars 7 forks source link

affilter can't seem to open files under Windows #26

Closed raphywink closed 10 years ago

raphywink commented 10 years ago

The normalizePath that fixed this issue with all the other functions strangely doesn't fix the issue for affilter()

> affilter(wavFiles[1])
Error in affilter(wavFiles[1]) : 
  Cant open file (C:/Users/raphael/Documents/R/win-library/3.1/wrassp/extdata/lbo001.wav)
quabolasse commented 10 years ago

Ok, let’s just not support windows maybe. No one is using it anymore, right?

On Jul 2, 2014, at 11:15 AM, Raphael Winkelmann notifications@github.com wrote:

The normalizePath that fixed this issue with all the other functions strangely doesn't fix the issue for affilter()

affilter(wavFiles[1]) Error in affilter(wavFiles[1]) : Cant open file (C:/Users/raphael/Documents/R/win-library/3.1/wrassp/extdata/lbo001.wav) — Reply to this email directly or view it on GitHub.

raphywink commented 10 years ago

Where is the damn like button when you need it! But unfortunately the people at CRAN and the usage statistics of operating systems disagree...

raphywink commented 10 years ago

Fun fact: the stdio.h function tmpfile() used by a function called by affilter here tries to write to the toplevel directory (C:/) under windows which it is not allowed to do. Hence the error... running R with admin privileges fixes the bug! I feel like breaking something... aarrrrrgggghhhhh

raphywink commented 10 years ago

7e8470fb18ad3dcf fixes the problem. We now check to see if OS is Windows and if this is the case we use the GetTempPath(); and GetTempFileName(); from window.h to get a valid tmp file path.