Pandora is making substantial investments in its future to compete with digital radio players like iHeartRadio as well as on-demand streaming services like Spotify. Andrew Harrer/Bloomberg via Getty Images

Pandora Media Inc. (P) may be having trouble expanding its audience, but it's getting better at squeezing revenue out of it.

Thanks to a substantial lift in advertising sales, the streaming radio giant beat revenue expectations in the first quarter, pulling in $297.3 million, against projected revenue between $280 million and $290 million. The total represented a 29 percent increase from the $230.8 million earned over the same period last year.

Pandora managed to do this while also trimming its expenses, beating its own EBITDA forecast; the $59 million loss it reported wound up being smaller than the $65 million to $75 million loss it had projected in its preceding earnings report.

Analysts had estimated negative earnings per share of 32 cents. The actual EPS figure (non-GAAP) was negative 20 cents, worse than negative 12 cents in the quarter a year earlier.

Pandora’s staying in the red because of substantial investments it’s making in its future, when it will have to compete with digital radio players like iHeartRadio as well as on-demand streaming services like Spotify. It plans to spend $345 million over the course of the year readying itself for international expansion, the rollout of an on-demand product and to ramp up its ticketing operations, which it added by acquiring Ticketfly late last year for $450 million.

Pandora is heading in these new directions because it appears to have run out of head room. In its 2015 year-end financial results, the company revealed it has 81.1 million active users, tepid growth that spooked investors when it first began to manifest last year. It reported 79.4 million monthly active users in the first quarter.

Faced with limited prospects to grow its user base much further, the company has been busy improving ad operations so it can extract more money from that base. The long-term gains projected from these businesses are substantial, and they are trending in the right direction. Quarterly revenue from ticketing rose approximately 30 percent, to more than $22 million.

Pandora's revenue per thousand hours listened, or RPM, has been trending upward, crossing the $50 threshold late last year, during a flush fourth quarter.

The company has said it expects it can push RPMs well past $70 in the years to come, but getting there will require a massive leap in the amount of money Pandora makes from mobile advertising. In the past couple of years, its mobile consumption numbers have exploded, minimizing the steady gains the company’s made in desktop RPMs and putting downward pressure on overall earnings.

According to Thursday's report, total RPMs for the first quarter exceeded $45. However, the company reversed a yearslong trend of breaking out mobile and desktop RPMs.

The positive results from the quarter also led the company to revise its picture of the next quarter, targeting second-quarter revenues between $345 million and $355 million, and EBITDA losses of $20 million to $30 million.