MCPcopy Create free account
hub / github.com/Yaafe/Yaafe / setOutputFormat

Method setOutputFormat

src_python/yaafelib/audiofileprocessor.py:80–102  ·  view source on GitHub ↗

Set output format. :param format: format to set :type format: string :param outDir: base output directory for output files :type outDir: string :param params: format parameters :type params: dict :retur

(self, format, outDir, params)

Source from the content-addressed store, hash-verified

78 yc.audiofileprocessor_destroy(self.ptr)
79
80 def setOutputFormat(self, format, outDir, params):
81 """
82 Set output format.
83
84 :param format: format to set
85 :type format: string
86 :param outDir: base output directory for output files
87 :type outDir: string
88 :param params: format parameters
89 :type params: dict
90 :return: True if ok, False if format does not exists.
91 """
92 if not AudioFileProcessor._YAAFE_IO_LOADED:
93 AudioFileProcessor._YAAFE_IO_LOADED = (
94 loadComponentLibrary('yaafe-io') == 0)
95
96 tmp = ((c_char_p*2)*(len(params)+1))()
97 tmp[:-1] = [(c_char_p*2)(c_char_p(to_char(k)), c_char_p(to_char(v)))
98 for k, v in iteritems(params)]
99 if yc.audiofileprocessor_setOutputFormat(self.ptr, to_char(format),
100 to_char(outDir), tmp):
101 return True
102 return False
103
104 def processFile(self, engine, filename):
105 """

Callers 1

mainFunction · 0.95

Calls 3

loadComponentLibraryFunction · 0.90
to_charFunction · 0.90
iteritemsFunction · 0.90

Tested by

no test coverage detected