sample

How to convert sample rate from AV_SAMPLE_FMT_FLTP to AV_SAMPLE_FMT_S16?

前提是你 提交于 2019-12-03 02:27:40
问题 I am decoding aac to pcm with ffmpeg with avcodec_decode_audio3. However it decodes into AV_SAMPLE_FMT_FLTP sample format (PCM 32bit Float Planar) and i need AV_SAMPLE_FMT_S16 (PCM 16 bit signed - S16LE). I know that ffmpeg can do this easily with -sample_fmt. I want to do the same with the code but i still couldn't figure it out. audio_resample did not work for: it fails with error message: .... conversion failed. 回答1: EDIT 9th April 2013 : Worked out how to use libswresample to do this...

Error compile in “Use Facebook Login example”

心已入冬 提交于 2019-12-02 21:40:21
I'm trying to create the Login Application in this tutorial: I'm getting this error in my logcat: 11-22 15:57:53.863: E/AndroidRuntime(816): com.facebook.FacebookException: Cannot use SessionLoginBehavior SSO_WITH_FALLBACK when com.facebook.LoginActivity is not declared as an activity in AndroidManifest.xml Anyone know why? May you forgot to define Activity in your AndroidManifest.xml <activity android:name="com.facebook.LoginActivity" android:label="@string/title_facebook_login" > </activity> I had the same problem and it was because I forgot to add the com.facebook.LoginActivity activity to

iPhone and printer integration Sample code/API for custom App development

南楼画角 提交于 2019-12-02 18:06:43
问题 My recent engagement demands a printer integration using iPhone. The app will • Generate a PDF with the collected data • Print the same when user clicks print button I am fairly new in iPhone development. There are hardly any reference and sample codes to support the printing feature , however there are quite a few apps available in the market to print from iPhone! Please help me with reference or sample code to realize the feature from within the custom app we are building. Many Thanks -Jeet

.NET DDD Example [closed]

北战南征 提交于 2019-12-02 16:43:51
Can somebody point me towards a 'complete' DDD example developed on the .NET platform. Most of the examples I find feel 'incomplete'. I'd really like to see the DDD principles in action. You could try the code that is built as part of the .NET Domain-Driven Design with C#: Problem - Design - Solution book. The code is freely available from Codeplex here and also on the book's website, and is a fairly feature complete application demonstrating DDD with C#. From the codeplex site: The book is one large case study of a real-world application, named SmartCA, which is a smart client application

Sample app for Rails 3?

我的梦境 提交于 2019-12-02 16:19:21
Can someone point me to a solid sample app that shows how to use the new features and syntax of Rails 3? It's been answered before for earlier versions ( https://stackoverflow.com/questions/248371/whats-the-best-open-source-ruby-on-rails-project-to-learn-from ), but I have not seen one for Rails 3. Specifically the following: Routing Mailer new query syntax complex forms (how do these work with the new routing) unobtrusive js (specifically jQuery) You might want to check Projexion . It uses Rails 3 beta 3. Here's a nice Rails 3 overview from IBM (surprisingly), along with links to additional

How to convert sample rate from AV_SAMPLE_FMT_FLTP to AV_SAMPLE_FMT_S16?

一笑奈何 提交于 2019-12-02 16:01:12
I am decoding aac to pcm with ffmpeg with avcodec_decode_audio3. However it decodes into AV_SAMPLE_FMT_FLTP sample format (PCM 32bit Float Planar) and i need AV_SAMPLE_FMT_S16 (PCM 16 bit signed - S16LE). I know that ffmpeg can do this easily with -sample_fmt. I want to do the same with the code but i still couldn't figure it out. audio_resample did not work for: it fails with error message: .... conversion failed. EDIT 9th April 2013 : Worked out how to use libswresample to do this... much faster! At some point in the last 2-3 years FFmpeg's AAC decoder's output format changed from AV_SAMPLE

{ Qt5.0.2/QML/QtQuick2.0/C++ } Example Projects that run without errors? [closed]

烈酒焚心 提交于 2019-12-02 15:18:55
My setup is Qt5.0.2 MinGW 32-bit . I am looking for { Qt5.0.2 / QML / QtQuick2.0 / C++ } code project examples (not Qt Quick 1.0 ) that have actual C++ classes or at least a main.cpp . I ran through the web, browsed all examples I could possibly find: http://qt-project.org/ website; github; stack overflow (if anyone had previously addressed this question); http://www.developer.nokia.com/Develop/Qt/Code_examples/ but they were either old ( Qt Quick 1.0 ) or pure QML+ QtQuick 2.0 or did not compile at all; or if they could compile, they showed me empty dialogs (for example, the " Status Shout! "

Randomly split a dataframe in n equal pieces

本小妞迷上赌 提交于 2019-12-02 12:24:42
lets say I have a list of dataframes different numbers of rows: AB_df = data.frame(replicate(2,sample(0:130,201,rep=TRUE))) BC_df = data.frame(replicate(2,sample(0:130,200,rep=TRUE))) DE_df = data.frame(replicate(2,sample(0:130,197,rep=TRUE))) FG_df = data.frame(replicate(2,sample(0:130,203,rep=TRUE))) AB_pc = data.frame(replicate(2,sample(0:130,201,rep=TRUE))) BC_pc = data.frame(replicate(2,sample(0:130,200,rep=TRUE))) DE_pc = data.frame(replicate(2,sample(0:130,197,rep=TRUE))) FG_pc = data.frame(replicate(2,sample(0:130,203,rep=TRUE))) df_list = list(AB_df, BC_df, DE_df, FG_df, AB_pc, BC_pc,

iPhone and printer integration Sample code/API for custom App development

独自空忆成欢 提交于 2019-12-02 11:04:08
My recent engagement demands a printer integration using iPhone. The app will • Generate a PDF with the collected data • Print the same when user clicks print button I am fairly new in iPhone development. There are hardly any reference and sample codes to support the printing feature , however there are quite a few apps available in the market to print from iPhone! Please help me with reference or sample code to realize the feature from within the custom app we are building. Many Thanks -Jeet I haven't developed an app that supports printing, however, I'm pretty sure the ones that do must be

Pick one random element from a vector for each row of a data.table

眉间皱痕 提交于 2019-12-02 05:23:27
问题 I have a dataframe of names. And I have a vector of different food items. I want to pick one element from that vector randomly for each Name so that the data.table looks like below. x<- c("apple","pepsi","rice","coke","banana","butter","bread") library(data.table) dt <- fread(' Name NextItem John rice Logan butter Sarah bread Vinny rice ') I want the sampling with replacement. I have tried dt[,NextItem:= sample(x,1)] but it samples the same food item(vector element) for everyone, not