桌面上的AVAudioSession?

时间:2016-10-10 06:58:58

标签: objective-c macos avfoundation

在Mac桌面上我试图录制系统声音(以及可选的麦克风声音 - 但是为了开始我只是在做系统声音)。

我正在关注本指南 - https://www.appcoda.com/ios-avfoundation-framework-tutorial/

但是我一直在接受:

var app = angular.module('plunker', ['ui.bootstrap']);

    app.factory('dataProviderService', ['$http', function($http) {
        var factory = {};
        factory.getCities = function(input) {
            //I've used google api to fetch cities ..we can place our service call here..
          return  $http.get('//maps.googleapis.com/maps/api/geocode/json', {
                params: {
                    address: input,
                    sensor: false
                }
            }).then(function(response) {//on success the results can be further processed as required..
                return response.data.results.map(function(item) {
                    return item.formatted_address;
                });
            });

        };

        return factory;
    }]);

     app.controller('TypeaheadCtrl', ['$scope', '$log','$http', 'dataProviderService', function($scope, $log,$http, dataProviderService) {
            $scope.suggestions= function(viewValue) {
                //you can call your own service call via a factory 
             return   dataProviderService.getCities(viewValue);

            };

        }]);

import

我正在编译:

 songifier.mm:8:9: fatal error: 'AVFoundation/AVAudioSession.h' file not found

有谁知道如何在桌面上使用gcc -framework Cocoa -framework Foundation -framework Carbon -framework AppKit -framework AVFoundation -lstdc++ -o songifier songifier.mm 来记录系统音频?

1 个答案:

答案 0 :(得分:3)

桌面没有AVAudioSession - 必须从为macos编译的任何内容中排除该代码。