diff --git a/libinterp/dldfcn/audiodevinfo.cc b/libinterp/dldfcn/audiodevinfo.cc
--- a/libinterp/dldfcn/audiodevinfo.cc
+++ b/libinterp/dldfcn/audiodevinfo.cc
@@ -51,6 +51,34 @@ along with Octave; see the file COPYING.
 
 #include <portaudio.h>
 
+struct portaudio_initialized_sentry
+{
+  portaudio_initialized_sentry (void) : initialized (false) { }
+
+  ~portaudio_initialized_sentry (void)
+  {
+    if (initialized)
+      Pa_Terminate ();
+  }
+
+  bool initialized;
+};
+
+static portaudio_initialized_sentry sentry;
+
+static PaError
+portaudio_initialize_once (octave::interpreter& interp)
+{
+  if (sentry.initialized)
+    return paNoError;
+
+  PaError retval = Pa_Initialize ();
+  sentry.initialized = (retval == paNoError);
+  interp.mlock ();
+
+  return retval;
+}
+
 PaSampleFormat
 bits_to_format (int bits)
 {
@@ -70,8 +98,8 @@ bits_to_format (int bits)
 
 #endif
 
-DEFUN_DLD (audiodevinfo, args, ,
-           doc: /* -*- texinfo -*-
+DEFMETHOD_DLD (audiodevinfo, interp, args, ,
+               doc: /* -*- texinfo -*-
 @deftypefn {} {@var{devinfo} =} audiodevinfo ()
 
 @deftypefnx {} {@var{devs} =} audiodevinfo (@var{io})
@@ -118,7 +146,7 @@ recording using those parameters.
   octave_value_list input;
   octave_value_list output;
 
-  PaError err = Pa_Initialize ();
+  PaError err = portaudio_initialize_once (interp);
 
   if (err != paNoError)
     error ("audiodevinfo: PortAudio initialization failed");
@@ -413,6 +441,7 @@ recording using those parameters.
 
 #else
   octave_unused_parameter (args);
+  octave_unused_parameter (interp);
 
   err_disabled_feature ("audiodevinfo",
                         "audio playback and recording through PortAudio");
@@ -856,9 +885,6 @@ audioplayer::print_raw (std::ostream& os
 void
 audioplayer::init_fn (void)
 {
-  if (Pa_Initialize () != paNoError)
-    error ("audioplayer: initialization error!");
-
   if (Pa_GetDeviceCount () < 1)
     error ("audioplayer: no audio devices found or available!");
 
@@ -892,9 +918,6 @@ audioplayer::init (void)
   // int channels = y.rows ();
   // RowVector *sound_l = get_left ();
 
-  if (Pa_Initialize () != paNoError)
-    error ("audioplayer: initialization error!");
-
   if (Pa_GetDeviceCount () < 1)
     error ("audioplayer: no audio devices found or available!");
 
@@ -1492,9 +1515,6 @@ audiorecorder::print_raw (std::ostream& 
 void
 audiorecorder::init (void)
 {
-  if (Pa_Initialize () != paNoError)
-    error ("audiorecorder: initialization error!");
-
   if (Pa_GetDeviceCount () < 1)
     error ("audiorecorder: no audio devices found or available!");
 
@@ -1811,8 +1831,8 @@ audiorecorder::get_stream (void)
 
 #endif
 
-DEFUN_DLD (__recorder_audiorecorder__, args, ,
-           doc: /* -*- texinfo -*-
+DEFMETHOD_DLD (__recorder_audiorecorder__, interp, args, ,
+               doc: /* -*- texinfo -*-
 @deftypefn  {} {@var{recorder} =} __recorder_audiorecorder__ (@var{fs}, @var{nbits}, @var{channels})
 @deftypefnx {} {@var{recorder} =} __recorder_audiorecorder__ (@var{fs}, @var{nbits}, @var{channels}, @var{id})
 @deftypefnx {} {@var{recorder} =} __recorder_audiorecorder__ (@var{fcn}, @dots{})
@@ -1823,6 +1843,7 @@ Undocumented internal function.
 
 #if ! defined (HAVE_PORTAUDIO)
   octave_unused_parameter (args);
+  octave_unused_parameter (interp);
 
   err_disabled_feature ("__recorder_audiorecorder__",
                         "audio playback and recording through PortAudio");
@@ -1830,6 +1851,9 @@ Undocumented internal function.
 
   int nargin = args.length ();
 
+  if (portaudio_initialize_once (interp) != paNoError)
+    error ("audiorecorder: error initializing PortAudio library");
+
   audiorecorder *recorder = new audiorecorder ();
 
   if (nargin > 0)
@@ -2207,8 +2231,8 @@ Undocumented internal function.
 #endif
 }
 
-DEFUN_DLD (__player_audioplayer__, args, ,
-           doc: /* -*- texinfo -*-
+DEFMETHOD_DLD (__player_audioplayer__, interp, args, ,
+               doc: /* -*- texinfo -*-
 @deftypefn  {} {@var{player} =} __player_audioplayer__ (@var{y}, @var{fs})
 @deftypefnx {} {@var{player} =} __player_audioplayer__ (@var{y}, @var{fs}, @var{nbits})
 @deftypefnx {} {@var{player} =} __player_audioplayer__ (@var{y}, @var{fs}, @var{nbits}, @var{id})
@@ -2218,11 +2242,15 @@ Undocumented internal function.
   octave_value retval;
 #if ! defined (HAVE_PORTAUDIO)
   octave_unused_parameter (args);
+  octave_unused_parameter (interp);
 
   err_disabled_feature ("__player_audioplayer__",
                         "audio playback and recording through PortAudio");
 #else
 
+  if (portaudio_initialize_once (interp) != paNoError)
+    error ("audioplayer: error initializing PortAudio library");
+
   audioplayer *recorder = new audioplayer ();
 
   if (! recorder)
